diff --git a/Site/App_GlobalResources/Pages.Financial.designer.cs b/Site/App_GlobalResources/Pages.Financial.designer.cs
index 6a68439a..9c6e374c 100644
--- a/Site/App_GlobalResources/Pages.Financial.designer.cs
+++ b/Site/App_GlobalResources/Pages.Financial.designer.cs
@@ -501,6 +501,15 @@ namespace Resources.Pages {
}
}
+ ///
+ /// Looks up a localized string similar to Create.
+ ///
+ internal static string CreateInboundInvoice_ButtonCreate {
+ get {
+ return ResourceManager.GetString("CreateInboundInvoice_ButtonCreate", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Description.
///
@@ -609,6 +618,51 @@ namespace Resources.Pages {
}
}
+ ///
+ /// Looks up a localized string similar to Please enter the amount of money (in {0}) the invoice requests..
+ ///
+ internal static string CreateInboundInvoice_ValidationError_Amount {
+ get {
+ return ResourceManager.GetString("CreateInboundInvoice_ValidationError_Amount", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Please specify a budget to charge..
+ ///
+ internal static string CreateInboundInvoice_ValidationError_Budget {
+ get {
+ return ResourceManager.GetString("CreateInboundInvoice_ValidationError_Budget", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Please upload one or more documents of the original invoice..
+ ///
+ internal static string CreateInboundInvoice_ValidationError_Documents {
+ get {
+ return ResourceManager.GetString("CreateInboundInvoice_ValidationError_Documents", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Please select an option..
+ ///
+ internal static string CreateInboundInvoice_ValidationError_MissingTag {
+ get {
+ return ResourceManager.GetString("CreateInboundInvoice_ValidationError_MissingTag", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Please describe what this purchase was..
+ ///
+ internal static string CreateInboundInvoice_ValidationError_Purpose {
+ get {
+ return ResourceManager.GetString("CreateInboundInvoice_ValidationError_Purpose", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to This is a QR code for donations to {0}. Read it from your phone's bitcoin wallet to make a donation, or donate from your computer directly to [{1}] (that's a bitcoin address)..
///
diff --git a/Site/App_GlobalResources/Pages.Financial.resx b/Site/App_GlobalResources/Pages.Financial.resx
index b15d2e24..2ca7d77d 100644
--- a/Site/App_GlobalResources/Pages.Financial.resx
+++ b/Site/App_GlobalResources/Pages.Financial.resx
@@ -585,6 +585,25 @@
The receipts for Expense Claim #{0:N0} for {1} {2:N2} have been validated.
+
+ Create
+ Could also be "file" (as verb, about the invoice) or equivalent
+
+
+ Please enter the amount of money (in {0}) the invoice requests.
+
+
+ Please specify a budget to charge.
+
+
+ Please upload one or more documents of the original invoice.
+
+
+ Please select an option.
+
+
+ Please describe what this purchase was.
+
Request
Could also be "file" (as verb) or equivalent
diff --git a/Site/Pages/v5/Financial/CreateInboundInvoice.aspx b/Site/Pages/v5/Financial/CreateInboundInvoice.aspx
index 99800a00..b7053e80 100644
--- a/Site/Pages/v5/Financial/CreateInboundInvoice.aspx
+++ b/Site/Pages/v5/Financial/CreateInboundInvoice.aspx
@@ -35,23 +35,23 @@
function validateFields() {
var isValid = true;
- isValid = validateTextField('#<%=this.TextAccount.ClientID %>', "") && isValid;
+ isValid = validateTextField('#<%=this.TextAccount.ClientID %>', SwarmopsJS.unescape('<%= this.Localized_ValidationError_BankAccount %>')) && 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();
@@ -67,7 +67,7 @@
if (msg.d != true) {
isValid = false;
$('#<%=CurrencyAmount.ClientID %>_Input').addClass("entryError");
- alertify.error("");
+ alertify.error(SwarmopsJS.unescape('<%= this.Localized_ValidationError_Amount %>'));
$('#<%=CurrencyAmount.ClientID %>_Input').focus();
}
}
@@ -84,7 +84,7 @@
if (msg.d != true) {
isValid = false;
$('#TextAmount').addClass("entryError");
- alertify.error("");
+ alertify.error(SwarmopsJS.unescape('<%= this.Localized_ValidationError_Documents %>'));
}
}
});
@@ -104,7 +104,7 @@
}
- var successMessage = unescape('');
+ var successMessage = SwarmopsJS.unescape(<%= this.Localized_ForGreatJustice %>);
diff --git a/Site/Pages/v5/Financial/CreateInboundInvoice.aspx.cs b/Site/Pages/v5/Financial/CreateInboundInvoice.aspx.cs
index 9d7198f5..668a7db6 100644
--- a/Site/Pages/v5/Financial/CreateInboundInvoice.aspx.cs
+++ b/Site/Pages/v5/Financial/CreateInboundInvoice.aspx.cs
@@ -122,12 +122,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
this.LabelReference.Text = Resources.Pages.Financial.CreateInboundInvoice_Reference;
this.LabelAccount.Text = Resources.Pages.Financial.CreateInboundInvoice_SupplierAccount;
- this.LiteralErrorAmount.Text = Resources.Pages.Financial.FileExpenseClaim_ValidationError_Amount;
- // TODO: Validation errors
- this.LiteralErrorPurpose.Text = Resources.Pages.Financial.FileExpenseClaim_ValidationError_Purpose;
- this.LiteralErrorBudget.Text = Resources.Pages.Financial.RequestCashAdvance_ValidationError_Budget;
- this.LiteralErrorBankAccount.Text = Resources.Pages.Financial.CreateInboundInvoice_ValidationError_Account;
- this.LiteralErrorDocuments.Text = Resources.Pages.Financial.FileExpenseClaim_ValidationError_Documents;
+ this.ButtonCreate.Text = Resources.Pages.Financial.CreateInboundInvoice_ButtonCreate;
}
@@ -186,9 +181,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
// Display success message
- this.LiteralSuccess.Text = HttpUtility.UrlEncode (
- String.Format (Resources.Pages.Financial.CreateInboundInvoice_SuccessMessage,
- invoice.Identity)).Replace ("+", "%20");
+ invoiceId = invoice.Identity; // a property returns the localized string
// Reset all fields for next invoice
@@ -206,10 +199,55 @@ namespace Swarmops.Frontend.Pages.v5.Financial
}
+ private int invoiceId = 0;
+
+
protected class TagSetDataSourceItem
{
public int TagSetId { get; set; }
public string TagSetLocalizedName { get; set; }
}
+
+ // ReSharper disable InconsistentNaming
+ public string Localized_ForGreatJustice
+ {
+ get
+ {
+ return
+ JavascriptEscape (String.Format (Resources.Pages.Financial.CreateInboundInvoice_SuccessMessage,
+ invoiceId));
+ }
+ }
+
+ public string Localized_ValidationError_MissingTag
+ {
+ get { return JavascriptEscape(Resources.Pages.Financial.CreateInboundInvoice_ValidationError_MissingTag); }
+ }
+
+ public string Localized_ValidationError_Account
+ {
+ get { return JavascriptEscape(Resources.Pages.Financial.CreateInboundInvoice_ValidationError_Account); }
+ }
+
+ public string Localized_ValidationError_Purpose
+ {
+ get { return JavascriptEscape(Resources.Pages.Financial.CreateInboundInvoice_ValidationError_Purpose); }
+ }
+
+ public string Localized_ValidationError_Budget
+ {
+ get { return JavascriptEscape(Resources.Pages.Financial.CreateInboundInvoice_ValidationError_Budget); }
+ }
+
+ public string Localized_ValidationError_Amount
+ {
+ get { return JavascriptEscape(Resources.Pages.Financial.CreateInboundInvoice_ValidationError_Amount); }
+ }
+
+ public string Localized_ValidationError_Documents
+ {
+ get { return JavascriptEscape(Resources.Pages.Financial.CreateInboundInvoice_ValidationError_Documents); }
+ }
+
}
}
\ No newline at end of file
diff --git a/Site/Pages/v5/Financial/CreateInboundInvoice.aspx.designer.cs b/Site/Pages/v5/Financial/CreateInboundInvoice.aspx.designer.cs
index 56623bd1..e4646cc3 100644
--- a/Site/Pages/v5/Financial/CreateInboundInvoice.aspx.designer.cs
+++ b/Site/Pages/v5/Financial/CreateInboundInvoice.aspx.designer.cs
@@ -21,24 +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;
-
- ///
- /// 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.
///
@@ -48,42 +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;
-
- ///
- /// LiteralSuccess control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Literal LiteralSuccess;
-
///
/// BoxTitle control.
///
diff --git a/Site/Pages/v5/Financial/FileExpenseClaim.aspx.cs b/Site/Pages/v5/Financial/FileExpenseClaim.aspx.cs
index b047d681..49d62a1c 100644
--- a/Site/Pages/v5/Financial/FileExpenseClaim.aspx.cs
+++ b/Site/Pages/v5/Financial/FileExpenseClaim.aspx.cs
@@ -257,7 +257,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
public string Localized_ValidationError_Amount
{
- get { return JavascriptEscape(Resources.Pages.Financial.FileExpenseClaim_ValidationError_Amount); }
+ get { return JavascriptEscape(String.Format(Resources.Pages.Financial.FileExpenseClaim_ValidationError_Amount, CurrentOrganization.Currency.DisplayCode)); }
}
public string Localized_ValidationError_Documents
diff --git a/Site/Pages/v5/Financial/RequestCashAdvance.aspx b/Site/Pages/v5/Financial/RequestCashAdvance.aspx
index 4c21a552..44ff3a2b 100644
--- a/Site/Pages/v5/Financial/RequestCashAdvance.aspx
+++ b/Site/Pages/v5/Financial/RequestCashAdvance.aspx
@@ -9,16 +9,17 @@
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;
- alertify.error("");
+ $('#<%=this.ComboBudgets.ClientID %>_SpanBudgets').addClass("entryError");
+ alertify.error(SwarmopsJS.unescape('<%= this.Localized_ValidationError_Budget %>'));
}
- isValid = validateTextField('#<%=this.TextPurpose.ClientID %>', "") && isValid;
+ isValid = validateTextField('#<%=this.TextPurpose.ClientID %>', SwarmopsJS.unescape('<%= this.Localized_ValidationError_Purpose %>')) && isValid;
var jsonData = {};
jsonData.amount = $('#<%=this.TextAmount.ClientID %>_Input').val();
@@ -33,7 +34,7 @@
success: function (msg) {
if (msg.d != true) {
isValid = false;
- alertify.error("");
+ alertify.error(SwarmopsJS.unescape('<%= this.Localized_ValidationError_Amount %>'));
$('#<%=this.TextAmount.ClientID %>_Input').addClass("entryError").focus();
}
}
diff --git a/Site/Pages/v5/Financial/RequestCashAdvance.aspx.cs b/Site/Pages/v5/Financial/RequestCashAdvance.aspx.cs
index 9c108044..f389ce57 100644
--- a/Site/Pages/v5/Financial/RequestCashAdvance.aspx.cs
+++ b/Site/Pages/v5/Financial/RequestCashAdvance.aspx.cs
@@ -48,14 +48,6 @@ namespace Swarmops.Frontend.Pages.v5.Financial
this.LabelBankName.Text = Resources.Pages.Financial.RequestCashAdvance_BankName;
this.LabelBankClearing.Text = Resources.Pages.Financial.RequestCashAdvance_BankClearing;
this.LabelBankAccount.Text = Resources.Pages.Financial.RequestCashAdvance_BankAccount;
-
- this.LiteralErrorAmount.Text = String.Format(Resources.Pages.Financial.RequestCashAdvance_ValidationError_Amount, CurrentOrganization.Currency.DisplayCode);
- this.LiteralErrorPurpose.Text = Resources.Pages.Financial.RequestCashAdvance_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;
}
@@ -114,5 +106,38 @@ namespace Swarmops.Frontend.Pages.v5.Financial
Response.Redirect ("/", true);
}
+
+
+ // ReSharper disable InconsistentNaming
+
+ 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.RequestCashAdvance_ValidationError_Purpose); }
+ }
+
+ public string Localized_ValidationError_Budget
+ {
+ get { return JavascriptEscape(Resources.Pages.Financial.RequestCashAdvance_ValidationError_Budget); }
+ }
+
+ public string Localized_ValidationError_Amount
+ {
+ get { return JavascriptEscape(String.Format(Resources.Pages.Financial.RequestCashAdvance_ValidationError_Amount, CurrentOrganization.Currency.DisplayCode)); }
+ }
}
}
\ No newline at end of file
diff --git a/Site/Pages/v5/Financial/RequestCashAdvance.aspx.designer.cs b/Site/Pages/v5/Financial/RequestCashAdvance.aspx.designer.cs
index a4cda0d1..99b6fd47 100644
--- a/Site/Pages/v5/Financial/RequestCashAdvance.aspx.designer.cs
+++ b/Site/Pages/v5/Financial/RequestCashAdvance.aspx.designer.cs
@@ -12,60 +12,6 @@ namespace Swarmops.Frontend.Pages.v5.Financial {
public partial class RequestCashAdvance {
- ///
- /// 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;
-
- ///
- /// 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;
-
///
/// BoxTitle control.
///