diff --git a/Site/Master-v5.master.cs b/Site/Master-v5.master.cs index 1a3d6018..ccb710ab 100644 --- a/Site/Master-v5.master.cs +++ b/Site/Master-v5.master.cs @@ -407,6 +407,7 @@ namespace Swarmops.Frontend // Localized strings for accessing from aspx page + // ReSharper disable once InconsistentNaming public string Localized_LoadingPlaceholderShort { get { return CommonV5.JavascriptEscape (Resources.Global.Global_LoadingPlaceholderShort); } diff --git a/Site/Pages/v5/Financial/FileExpenseClaim.aspx b/Site/Pages/v5/Financial/FileExpenseClaim.aspx index 43916004..7812c776 100644 --- a/Site/Pages/v5/Financial/FileExpenseClaim.aspx +++ b/Site/Pages/v5/Financial/FileExpenseClaim.aspx @@ -30,25 +30,25 @@ function validateFields() { var isValid = true; - isValid = validateTextField('#<%=this.TextAccount.ClientID %>', "") && isValid; - isValid = validateTextField('#<%=this.TextClearing.ClientID %>', "") && isValid; - isValid = validateTextField('#<%=this.TextBank.ClientID %>', "") && isValid; + isValid = validateTextField('#<%=this.TextAccount.ClientID %>', SwarmopsJS.unescape('<%= this.Localized_ValidationError_BankAccount %>')) && isValid; + isValid = validateTextField('#<%=this.TextClearing.ClientID %>', SwarmopsJS.unescape('<%= this.Localized_ValidationError_BankClearing %>')) && isValid; + isValid = validateTextField('#<%=this.TextBank.ClientID %>', SwarmopsJS.unescape('<%= this.Localized_ValidationError_BankName %>')) && isValid; if ($('#<%=this.ComboBudgets.ClientID %>_DropBudgets').combotree('tree').tree('getSelected') == null) { isValid = false; $('#<%=this.ComboBudgets.ClientID %>_SpanBudgets').addClass("entryError"); - alertify.error(""); + alertify.error(SwarmopsJS.unescape('<%= this.Localized_ValidationError_Budget %>')); } if ($('#DropTags<%# Eval("TagSetId") %>').combotree('tree').tree('getSelected') == null) { isValid = false; $('#SpanDropTags<%# Eval("TagSetId") %>').addClass("entryError"); - alertify.error('<%=Resources.Pages.Financial.FileExpenseClaim_ValidationError_MissingTag.Replace("'", "''") %>'); + alertify.error(SwarmopsJS.unescape('<%=this.Localized_ValidationError_MissingTag %>')); } - isValid = validateTextField('#<%=this.TextPurpose.ClientID %>', "") && isValid; + isValid = validateTextField('#<%=this.TextPurpose.ClientID %>', SwarmopsJS.unescape('<%= this.Localized_ValidationError_Purpose %>')) && isValid; var jsonData = {}; jsonData.amount = $('#<%=this.CurrencyAmount.ClientID %>_Input').val(); @@ -64,7 +64,7 @@ if (msg.d != true) { isValid = false; $('#<%=this.CurrencyAmount.ClientID %>_Input').addClass("entryError"); - alertify.error(""); + alertify.error(SwarmopsJS.unescape('<%= this.Localized_ValidationError_Amount %>')); $('#<%=this.CurrencyAmount.ClientID %>_Input').focus(); } } @@ -81,7 +81,7 @@ if (msg.d != true) { isValid = false; $('#TextAmount').addClass("entryError"); - alertify.error(""); + alertify.error(SwarmopsJS.unescape('<%= this.Localized_ValidationError_Documents %>')); } } }); diff --git a/Site/Pages/v5/Financial/FileExpenseClaim.aspx.cs b/Site/Pages/v5/Financial/FileExpenseClaim.aspx.cs index 98765312..4a5c2d9a 100644 --- a/Site/Pages/v5/Financial/FileExpenseClaim.aspx.cs +++ b/Site/Pages/v5/Financial/FileExpenseClaim.aspx.cs @@ -128,15 +128,6 @@ namespace Swarmops.Frontend.Pages.v5.Financial this.LabelBankAccount.Text = Resources.Pages.Financial.FileExpenseClaim_BankAccount; this.LabelHeaderImageFiles.Text = Resources.Pages.Financial.FileExpenseClaim_HeaderReceiptImages; this.LabelImageFiles.Text = Resources.Pages.Financial.FileExpenseClaim_UploadRecieptImages; - - this.LiteralErrorAmount.Text = Resources.Pages.Financial.FileExpenseClaim_ValidationError_Amount; - this.LiteralErrorPurpose.Text = Resources.Pages.Financial.FileExpenseClaim_ValidationError_Purpose; - this.LiteralErrorBudget.Text = Resources.Pages.Financial.RequestCashAdvance_ValidationError_Budget; - this.LiteralErrorBankName.Text = Resources.Pages.Financial.RequestCashAdvance_ValidationError_BankName; - this.LiteralErrorBankClearing.Text = - Resources.Pages.Financial.RequestCashAdvance_ValidationError_BankClearing; - this.LiteralErrorBankAccount.Text = Resources.Pages.Financial.RequestCashAdvance_ValidationError_BankAccount; - this.LiteralErrorDocuments.Text = Resources.Pages.Financial.FileExpenseClaim_ValidationError_Documents; } @@ -226,5 +217,51 @@ namespace Swarmops.Frontend.Pages.v5.Financial public int TagSetId { get; set; } public string TagSetLocalizedName { get; set; } } + + + // ASPX localizations + + + // ReSharper disable InconsistentNaming + public string Localized_ValidationError_MissingTag + { + get { return JavascriptEscape(Resources.Pages.Financial.FileExpenseClaim_ValidationError_MissingTag); } + } + + public string Localized_ValidationError_BankAccount + { + get { return JavascriptEscape(Resources.Pages.Financial.RequestCashAdvance_ValidationError_BankAccount); } + } + + public string Localized_ValidationError_BankClearing + { + get { return JavascriptEscape(Resources.Pages.Financial.RequestCashAdvance_ValidationError_BankClearing); } + } + + public string Localized_ValidationError_BankName + { + get { return JavascriptEscape(Resources.Pages.Financial.RequestCashAdvance_ValidationError_BankName); } + } + + public string Localized_ValidationError_Purpose + { + get { return JavascriptEscape(Resources.Pages.Financial.FileExpenseClaim_ValidationError_Purpose); } + } + + public string Localized_ValidationError_Budget + { + get { return JavascriptEscape(Resources.Pages.Financial.RequestCashAdvance_ValidationError_Budget); } + } + + public string Localized_ValidationError_Amount + { + get { return JavascriptEscape(Resources.Pages.Financial.FileExpenseClaim_ValidationError_Amount); } + } + + public string Localized_ValidationError_Documents + { + get { return JavascriptEscape(Resources.Pages.Financial.FileExpenseClaim_ValidationError_Documents); } + } + } } \ No newline at end of file diff --git a/Site/Pages/v5/Financial/FileExpenseClaim.aspx.designer.cs b/Site/Pages/v5/Financial/FileExpenseClaim.aspx.designer.cs index 65a226d5..385e875c 100644 --- a/Site/Pages/v5/Financial/FileExpenseClaim.aspx.designer.cs +++ b/Site/Pages/v5/Financial/FileExpenseClaim.aspx.designer.cs @@ -21,42 +21,6 @@ namespace Swarmops.Frontend.Pages.v5.Financial { /// protected global::System.Web.UI.WebControls.Repeater RepeaterTagDropScript; - /// - /// LiteralErrorBankAccount control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal LiteralErrorBankAccount; - - /// - /// LiteralErrorBankClearing control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal LiteralErrorBankClearing; - - /// - /// LiteralErrorBankName control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal LiteralErrorBankName; - - /// - /// LiteralErrorBudget control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal LiteralErrorBudget; - /// /// RepeaterErrorCheckTags control. /// @@ -66,33 +30,6 @@ namespace Swarmops.Frontend.Pages.v5.Financial { /// protected global::System.Web.UI.WebControls.Repeater RepeaterErrorCheckTags; - /// - /// LiteralErrorPurpose control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal LiteralErrorPurpose; - - /// - /// LiteralErrorAmount control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal LiteralErrorAmount; - - /// - /// LiteralErrorDocuments control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal LiteralErrorDocuments; - /// /// BoxTitle control. ///