fixed a bug that concerns the notice messages after form submission. Added a plugin into the pom file to fix a building problem with jdk7

This commit is contained in:
Ayoub BENALI 2012-12-01 02:33:05 +01:00
parent 9eb8e87373
commit 83f68806e6
2 changed files with 13 additions and 11 deletions

View File

@ -159,6 +159,11 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>

View File

@ -30,8 +30,8 @@ class AccountRegistration extends Loggable {
OBPUser.currentUser match {
case Full(user) => {
//load the suported banks list from the database
val banks = "Choose a Bank" :: HostedBank.findAll.map(_.name.get)
val options = Map("yes" -> true,"no" -> false)
val banks = "Choose a Bank" :: HostedBank.findAll.map(_.name.get)
val options = Map("yes" -> true,"no" -> false)
val optionsSwaped = options.map{_.swap}
//get a boolean value from a 'yes' or 'no' string
@ -48,13 +48,13 @@ class AccountRegistration extends Loggable {
def check() =
//check that all the parameters are here
if( !accountNumber.is.isEmpty & !accountPIN.is.isEmpty &
!accountName.is.isEmpty & !accountHolder.is.isEmpty &
!accountKind.is.isEmpty & ! accountLabel.is.isEmpty &
if( !accountNumber.is.isEmpty & !accountPIN.is.isEmpty &
!accountName.is.isEmpty & !accountHolder.is.isEmpty &
!accountKind.is.isEmpty & ! accountLabel.is.isEmpty &
bankName.is != "Choose a Bank" )
{
var reponceText = ""
var reponceId = ""
var reponceText = "Submission Failed. Please try later."
var reponceId = "submissionFailed"
val fileName = bankName.is+"-"+accountNumber.is+"-"+user.emailAddress
for{
//load the public key and output directory path
@ -99,10 +99,7 @@ class AccountRegistration extends Loggable {
reponceText = "Submission succeded. You will receive an email notification once the bank account will be setup by the administrator."
reponceId = "submissionSuccess"
}
case _ => {
reponceText = "Submission Failed. Please try later."
reponceId = "submissionFailed"
}
case _ => //nothing to do the text and Id are allready set
}
//set the fields to their default values
bankName.set("Choose a Bank")