first draft of the registration (adding bank account) page

This commit is contained in:
Ayoub BENALI 2012-11-26 18:28:19 +01:00
parent a34cf4352e
commit f257023fe8
6 changed files with 127 additions and 0 deletions

View File

@ -105,6 +105,11 @@
<version>6.1.25</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpg-jdk15</artifactId>
<version>1.46</version>
</dependency>
<!-- for LiftConsole -->
<dependency>
<groupId>org.scala-lang</groupId>

View File

@ -158,6 +158,8 @@ class Boot extends Loggable{
submenus(Privilege.menus : _*),
Menu.i("OAuth") / "oauth" / "authorize", //OAuth authorization page
Menu.i("Account Registration") / "registration",
Menu.i("Banks") / "banks", //no test => list of open banks
//list of open banks (banks with a least a bank account with an open account)
Menu.param[Bank]("Bank", "bank", LocalStorage.getBank _ , bank => bank.id ) / "banks" / * ,

View File

@ -0,0 +1,26 @@
package code.snippet
import code.model.dataAccess.{OBPUser,HostedBank}
import net.liftweb.common.{Full,Empty}
import scala.xml.NodeSeq
import net.liftweb.util.CssSel
import net.liftweb.util.Helpers._
import net.liftweb.http.SHtml
class AccountRegistration{
def render = {
OBPUser.currentUser match {
case Full(user) => {
var banks : List[(String, String)] = HostedBank.findAll.map(t => (t.id.get.toString,t.name.get))
banks ::= ("0","--> Choose a Bank")
def bankId(id :String) = id
"#bankList" #> SHtml.select(banks,Empty,bankId _) &
"#loginMsg * " #> ""
}
case _ =>
"#submitAccount" #> NodeSeq.Empty &
"#loginMsg * " #> "You need to login to submit you account"
}
}
}

View File

@ -0,0 +1,7 @@
package code.snippet
import org.bouncycastle.openpgp.examples.KeyBasedFileProcessor
class PGPenc {
}

View File

@ -566,4 +566,8 @@ a#feedBack
height: 87px;
background: url(../images/feedback-button.gif);
cursor: pointer;
}
span#registrationDetails
{
font-size: 10px;
}

View File

@ -0,0 +1,83 @@
<!--
Open Bank Project
Copyright 2011,2012 TESOBE / Music Pictures Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Open Bank Project (http://www.openbankproject.com)
Copyright 2011,2012 TESOBE / Music Pictures Ltd
This product includes software developed at
TESOBE (http://www.tesobe.com/)
by
Simon Redfern : simon AT tesobe DOT com
Everett Sochowski: everett AT tesobe DOT com
Ayoub Benali : ayoub AT tesobe DOT com
-->
<div id="main" class="lift:surround?with=default;at=content">
<div class="lift:AccountRegistration.render">
<form action="/registration" methond="post" id="submitAccount" class="lift:AccountRegistration" >
<TABLE>
<tbody>
<tr>
<td colspan="2" >Please fill in all the fields of the formular so we can add your bank account. * </td>
</tr>
<tr>
<td>
<label for="bankList">Bank</label>
</td>
<td>
<select id="bankList">
<option id="01"> post bank</option>
</select>
</td>
</tr>
<tr>
<td>
<label for="accountNumber">Account Number</label>
</td>
<td>
<input type="text" name="accountNumber" id="accountNumber"/>
</td>
</tr>
<tr>
<td>
<label for="accountPIN">PIN code</label>
</td>
<td>
<input type="password" name="accountPIN" id="accountPIN"/>
</td>
</tr>
<tr>
<td colspan="2" >
<span id="registrationDetails">
(*) : Your PIN code and all your bank details will be securely encrypted. We are committed to preserve your privacy and never disclose your data.
</span>
</td>
</tr>
<tr>
<td>
</td>
<td>
<input type="submit" value="submit" />
</td>
</tr>
</tbody>
</TABLE>
</form>
<div id="loginMsg"></div>
</div>
</div>