remove notSelectedCurrencies from currency configuration resource.
This commit is contained in:
@@ -8,7 +8,6 @@ import javax.xml.bind.annotation.XmlRootElement;
|
|||||||
@XmlRootElement
|
@XmlRootElement
|
||||||
public class OrganisationCurrencyCommand implements Serializable {
|
public class OrganisationCurrencyCommand implements Serializable {
|
||||||
|
|
||||||
private String[] notSelectedCurrencies;
|
|
||||||
private String[] currencies;
|
private String[] currencies;
|
||||||
|
|
||||||
public OrganisationCurrencyCommand() {
|
public OrganisationCurrencyCommand() {
|
||||||
@@ -19,14 +18,6 @@ public class OrganisationCurrencyCommand implements Serializable {
|
|||||||
this.currencies = selectedCurrencyCodes.toArray(new String[selectedCurrencyCodes.size()]);
|
this.currencies = selectedCurrencyCodes.toArray(new String[selectedCurrencyCodes.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String[] getNotSelectedCurrencies() {
|
|
||||||
return notSelectedCurrencies;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNotSelectedCurrencies(String... notSelectedCurrencies) {
|
|
||||||
this.notSelectedCurrencies = notSelectedCurrencies;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String[] getCurrencies() {
|
public String[] getCurrencies() {
|
||||||
return currencies;
|
return currencies;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -202,20 +202,24 @@
|
|||||||
var o = {};
|
var o = {};
|
||||||
var a = this.serializeArray();
|
var a = this.serializeArray();
|
||||||
$.each(a, function() {
|
$.each(a, function() {
|
||||||
if (o[this.name] !== undefined) {
|
if (this.name === 'notSelectedCurrencies') {
|
||||||
if (!o[this.name].push) {
|
// do not serialize
|
||||||
o[this.name] = [o[this.name]];
|
} else {
|
||||||
}
|
if (o[this.name] !== undefined) {
|
||||||
o[this.name].push(this.value || '');
|
if (!o[this.name].push) {
|
||||||
} else {
|
o[this.name] = [o[this.name]];
|
||||||
|
}
|
||||||
|
o[this.name].push(this.value || '');
|
||||||
|
} else {
|
||||||
|
|
||||||
if (this.name === 'currencies' || this.name === 'notSelectedCurrencies') {
|
if (this.name === 'currencies') {
|
||||||
o[this.name] = new Array();
|
o[this.name] = new Array();
|
||||||
o[this.name].push(this.value || '');
|
o[this.name].push(this.value || '');
|
||||||
} else {
|
} else {
|
||||||
o[this.name] = this.value || '';
|
o[this.name] = this.value || '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
return o;
|
return o;
|
||||||
};
|
};
|
||||||
@@ -229,7 +233,6 @@
|
|||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
cache: false,
|
cache: false,
|
||||||
beforeSend: function(xhr) {
|
beforeSend: function(xhr) {
|
||||||
console.log("base64: " + base64);
|
|
||||||
xhr.setRequestHeader("Authorization", "Basic " + base64);
|
xhr.setRequestHeader("Authorization", "Basic " + base64);
|
||||||
},
|
},
|
||||||
success: function(data, textStatus, jqXHR) {
|
success: function(data, textStatus, jqXHR) {
|
||||||
@@ -262,10 +265,9 @@
|
|||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
data: newFormData,
|
data: newFormData,
|
||||||
cache: false,
|
cache: false,
|
||||||
beforeSend: function(xhr) {
|
beforeSend: function(xhr) {
|
||||||
console.log("base64: " + base64);
|
xhr.setRequestHeader("Authorization", "Basic " + base64);
|
||||||
xhr.setRequestHeader("Authorization", "Basic " + base64);
|
},
|
||||||
},
|
|
||||||
success: saveSuccessFunction,
|
success: saveSuccessFunction,
|
||||||
error: function(jqXHR, textStatus, errorThrown) {
|
error: function(jqXHR, textStatus, errorThrown) {
|
||||||
handleXhrError(jqXHR, textStatus, errorThrown, "#formErrorsTemplate", "#formerrors");
|
handleXhrError(jqXHR, textStatus, errorThrown, "#formErrorsTemplate", "#formerrors");
|
||||||
|
|||||||
Reference in New Issue
Block a user