From ca8492e9335acd397ef01821e81103d4e1c23be7 Mon Sep 17 00:00:00 2001 From: Keith Woodlock Date: Mon, 28 May 2012 01:27:37 +0100 Subject: [PATCH] remove notSelectedCurrencies from currency configuration resource. --- .../command/OrganisationCurrencyCommand.java | 9 ----- .../webapp/WEB-INF/views/admin/orghome.jsp | 40 ++++++++++--------- 2 files changed, 21 insertions(+), 28 deletions(-) diff --git a/mifosng-data/src/main/java/org/mifosng/data/command/OrganisationCurrencyCommand.java b/mifosng-data/src/main/java/org/mifosng/data/command/OrganisationCurrencyCommand.java index a328416b0..99198299a 100644 --- a/mifosng-data/src/main/java/org/mifosng/data/command/OrganisationCurrencyCommand.java +++ b/mifosng-data/src/main/java/org/mifosng/data/command/OrganisationCurrencyCommand.java @@ -8,7 +8,6 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement public class OrganisationCurrencyCommand implements Serializable { - private String[] notSelectedCurrencies; private String[] currencies; public OrganisationCurrencyCommand() { @@ -19,14 +18,6 @@ public class OrganisationCurrencyCommand implements Serializable { this.currencies = selectedCurrencyCodes.toArray(new String[selectedCurrencyCodes.size()]); } - public String[] getNotSelectedCurrencies() { - return notSelectedCurrencies; - } - - public void setNotSelectedCurrencies(String... notSelectedCurrencies) { - this.notSelectedCurrencies = notSelectedCurrencies; - } - public String[] getCurrencies() { return currencies; } diff --git a/mifosng-individual-lending-app/src/main/webapp/WEB-INF/views/admin/orghome.jsp b/mifosng-individual-lending-app/src/main/webapp/WEB-INF/views/admin/orghome.jsp index 47a7c6050..1a5d4b3b1 100644 --- a/mifosng-individual-lending-app/src/main/webapp/WEB-INF/views/admin/orghome.jsp +++ b/mifosng-individual-lending-app/src/main/webapp/WEB-INF/views/admin/orghome.jsp @@ -202,20 +202,24 @@ var o = {}; var a = this.serializeArray(); $.each(a, function() { - if (o[this.name] !== undefined) { - if (!o[this.name].push) { - o[this.name] = [o[this.name]]; - } - o[this.name].push(this.value || ''); - } else { - - if (this.name === 'currencies' || this.name === 'notSelectedCurrencies') { - o[this.name] = new Array(); - o[this.name].push(this.value || ''); - } else { - o[this.name] = this.value || ''; - } - } + if (this.name === 'notSelectedCurrencies') { + // do not serialize + } else { + if (o[this.name] !== undefined) { + if (!o[this.name].push) { + o[this.name] = [o[this.name]]; + } + o[this.name].push(this.value || ''); + } else { + + if (this.name === 'currencies') { + o[this.name] = new Array(); + o[this.name].push(this.value || ''); + } else { + o[this.name] = this.value || ''; + } + } + } }); return o; }; @@ -229,7 +233,6 @@ dataType: 'json', cache: false, beforeSend: function(xhr) { - console.log("base64: " + base64); xhr.setRequestHeader("Authorization", "Basic " + base64); }, success: function(data, textStatus, jqXHR) { @@ -262,10 +265,9 @@ dataType: 'json', data: newFormData, cache: false, - beforeSend: function(xhr) { - console.log("base64: " + base64); - xhr.setRequestHeader("Authorization", "Basic " + base64); - }, + beforeSend: function(xhr) { + xhr.setRequestHeader("Authorization", "Basic " + base64); + }, success: saveSuccessFunction, error: function(jqXHR, textStatus, errorThrown) { handleXhrError(jqXHR, textStatus, errorThrown, "#formErrorsTemplate", "#formerrors");