From f257023fe876e2ace4cd0467c9282ccb6eebdb04 Mon Sep 17 00:00:00 2001 From: Ayoub BENALI Date: Mon, 26 Nov 2012 18:28:19 +0100 Subject: [PATCH] first draft of the registration (adding bank account) page --- MavLift/pom.xml | 5 ++ .../main/scala/bootstrap/liftweb/Boot.scala | 2 + .../code/snippet/AccountRegistration.scala | 26 ++++++ .../src/main/scala/code/snippet/PGPenc.scala | 7 ++ MavLift/src/main/webapp/media/css/website.css | 4 + MavLift/src/main/webapp/registration.html | 83 +++++++++++++++++++ 6 files changed, 127 insertions(+) create mode 100644 MavLift/src/main/scala/code/snippet/AccountRegistration.scala create mode 100644 MavLift/src/main/scala/code/snippet/PGPenc.scala create mode 100644 MavLift/src/main/webapp/registration.html diff --git a/MavLift/pom.xml b/MavLift/pom.xml index e99cac84..7a7d4cf9 100644 --- a/MavLift/pom.xml +++ b/MavLift/pom.xml @@ -105,6 +105,11 @@ 6.1.25 test + + org.bouncycastle + bcpg-jdk15 + 1.46 + org.scala-lang diff --git a/MavLift/src/main/scala/bootstrap/liftweb/Boot.scala b/MavLift/src/main/scala/bootstrap/liftweb/Boot.scala index fbace9fe..6c6bb51a 100755 --- a/MavLift/src/main/scala/bootstrap/liftweb/Boot.scala +++ b/MavLift/src/main/scala/bootstrap/liftweb/Boot.scala @@ -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" / * , diff --git a/MavLift/src/main/scala/code/snippet/AccountRegistration.scala b/MavLift/src/main/scala/code/snippet/AccountRegistration.scala new file mode 100644 index 00000000..16198cb4 --- /dev/null +++ b/MavLift/src/main/scala/code/snippet/AccountRegistration.scala @@ -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" + } + } +} \ No newline at end of file diff --git a/MavLift/src/main/scala/code/snippet/PGPenc.scala b/MavLift/src/main/scala/code/snippet/PGPenc.scala new file mode 100644 index 00000000..90913cdf --- /dev/null +++ b/MavLift/src/main/scala/code/snippet/PGPenc.scala @@ -0,0 +1,7 @@ +package code.snippet + +import org.bouncycastle.openpgp.examples.KeyBasedFileProcessor + +class PGPenc { + +} \ No newline at end of file diff --git a/MavLift/src/main/webapp/media/css/website.css b/MavLift/src/main/webapp/media/css/website.css index 9248204f..1a073584 100644 --- a/MavLift/src/main/webapp/media/css/website.css +++ b/MavLift/src/main/webapp/media/css/website.css @@ -566,4 +566,8 @@ a#feedBack height: 87px; background: url(../images/feedback-button.gif); cursor: pointer; +} +span#registrationDetails +{ + font-size: 10px; } \ No newline at end of file diff --git a/MavLift/src/main/webapp/registration.html b/MavLift/src/main/webapp/registration.html new file mode 100644 index 00000000..39ab17e6 --- /dev/null +++ b/MavLift/src/main/webapp/registration.html @@ -0,0 +1,83 @@ + + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Please fill in all the fields of the formular so we can add your bank account. *
+ + + +
+ + + +
+ + + +
+ + (*) : Your PIN code and all your bank details will be securely encrypted. We are committed to preserve your privacy and never disclose your data. + +
+ + +
+
+
+
+
\ No newline at end of file