diff --git a/src/main/resources/i18n/lift-core.properties b/src/main/resources/i18n/lift-core.properties index 68f69056..81bd0212 100644 --- a/src/main/resources/i18n/lift-core.properties +++ b/src/main/resources/i18n/lift-core.properties @@ -11,9 +11,12 @@ enter_label = Enter a label... create_account_label = Create a bank account bank_name = Bank name account_label = Account label -income_description = Income description -income_amount = Income amount -payment_description = payment description -payment_amount = payment amount +income_description = Description +income_amount = Amount \u20ac +payment_description = Description +payment_amount = Amount \u20ac income = Income -payment = Expenditure \ No newline at end of file +payment = Expenditure +add_expenditure = Add expenditure +add_income = Add income +button.save = Save \ No newline at end of file diff --git a/src/main/resources/i18n/lift-core_en_GB.properties b/src/main/resources/i18n/lift-core_en_GB.properties index 68f69056..e147a01b 100644 --- a/src/main/resources/i18n/lift-core_en_GB.properties +++ b/src/main/resources/i18n/lift-core_en_GB.properties @@ -11,9 +11,11 @@ enter_label = Enter a label... create_account_label = Create a bank account bank_name = Bank name account_label = Account label -income_description = Income description -income_amount = Income amount -payment_description = payment description -payment_amount = payment amount +income_description = Description +income_amount = Amount \u20ac +payment_description = Description +payment_amount = Amount \u20ac income = Income -payment = Expenditure \ No newline at end of file +payment = Expenditure +add_expenditure = Add expenditure +button.save = Save \ No newline at end of file diff --git a/src/main/scala/code/snippet/CreateExpenditure.scala b/src/main/scala/code/snippet/CreateExpenditure.scala index 5213d904..24fa9716 100644 --- a/src/main/scala/code/snippet/CreateExpenditure.scala +++ b/src/main/scala/code/snippet/CreateExpenditure.scala @@ -3,7 +3,7 @@ package code.snippet import code.Constant._ import code.lib.ObpAPI.{createOutcome, getAccount} import code.util.Helper.{MdcLoggable, getAccountTitle} -import net.liftweb.http.SHtml +import net.liftweb.http.{S, SHtml} import net.liftweb.http.js.JE.Call import net.liftweb.http.js.JsCmd import net.liftweb.http.js.JsCmds.SetHtml @@ -40,7 +40,7 @@ class CreateExpenditure(params: List[String]) extends MdcLoggable { "@payment_description" #> SHtml.text("", s => outcomeDescription = s) & "@payment_amount" #> SHtml.text("", s => outcomeAmount = s) & // Replace the type=submit with Javascript that makes the ajax call. - "type=submit" #> SHtml.ajaxSubmit("Add payment", process) + "type=submit" #> SHtml.ajaxSubmit(S.?("button.save"), process) ).apply(xhtml) } } diff --git a/src/main/scala/code/snippet/CreateIncome.scala b/src/main/scala/code/snippet/CreateIncome.scala index 9e2a9361..e9ecc873 100644 --- a/src/main/scala/code/snippet/CreateIncome.scala +++ b/src/main/scala/code/snippet/CreateIncome.scala @@ -3,7 +3,7 @@ package code.snippet import code.Constant._ import code.lib.ObpAPI.{createIncome, getAccount} import code.util.Helper.{MdcLoggable, getAccountTitle} -import net.liftweb.http.SHtml +import net.liftweb.http.{S, SHtml} import net.liftweb.http.js.JE.Call import net.liftweb.http.js.JsCmd import net.liftweb.http.js.JsCmds.SetHtml @@ -40,7 +40,7 @@ class CreateIncome(params: List[String]) extends MdcLoggable { "@income_description" #> SHtml.text("", s => incomeDescription = s) & "@income_amount" #> SHtml.text("", s => incomeAmount = s) & // Replace the type=submit with Javascript that makes the ajax call. - "type=submit" #> SHtml.ajaxSubmit("Add income", process) + "type=submit" #> SHtml.ajaxSubmit(S.?("button.save"), process) ).apply(xhtml) } } diff --git a/src/main/scala/code/snippet/WebUI.scala b/src/main/scala/code/snippet/WebUI.scala index 51e30630..8f3c91cc 100644 --- a/src/main/scala/code/snippet/WebUI.scala +++ b/src/main/scala/code/snippet/WebUI.scala @@ -42,6 +42,13 @@ class WebUI extends MdcLoggable{ "#change-password-link a [href]" #> scala.xml.Unparsed(s"$host/user_mgt/change_password") } + def homePage = { + val host = Props.get("base_url").getOrElse("unknown") + "#uk a [href]" #> scala.xml.Unparsed(s"$host/?locale=en_GB") & + "#it a [href]" #> scala.xml.Unparsed(s"$host/?locale=it_IT") & + "#ua a [href]" #> scala.xml.Unparsed(s"$host/?locale=uk_UA") + } + def setForgottenPasswordLink = { val host = Props.get("api_portal_hostname").or(Props.get("api_hostname")).getOrElse("unknown") "#reset-password-link a [href]" #> scala.xml.Unparsed(s"$host/user_mgt/lost_password") diff --git a/src/main/webapp/banks/star/accounts/star/create-expenditure.html b/src/main/webapp/banks/star/accounts/star/create-expenditure.html index cd1355ef..6dbd6f0f 100644 --- a/src/main/webapp/banks/star/accounts/star/create-expenditure.html +++ b/src/main/webapp/banks/star/accounts/star/create-expenditure.html @@ -47,7 +47,7 @@

ACCOUNT<
-

Payment

+

Expenditure

-

Income

+

Add income...

+