Skip to content

Commit 625f8d3

Browse files
committed
Fixed #54
1 parent 86f72d9 commit 625f8d3

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

interface/admin/www/app/view/newservice.js

+11-9
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ Ext.define('istsos.view.newservice', {
1212
}
1313
this.mask.show();
1414

15-
console.dir(this.getForm().getValues())
16-
1715
Ext.Ajax.request({
1816
url: Ext.String.format('{0}/istsos/operations/validatedb', wa.url),
1917
scope: this,
@@ -69,36 +67,40 @@ Ext.define('istsos.view.newservice', {
6967
});
7068
},
7169
operationPost: function(){
72-
73-
var json = this.istForm.getValues();
70+
71+
var values = this.istForm.getValues();
72+
var json = {};
7473

75-
if (Ext.isEmpty(json['customdb'])) {
74+
if (Ext.isEmpty(values['customdb'])) {
7675
if (!Ext.getCmp('nsservice').isValid()){
7776
Ext.Msg.alert('Validation error', 'Service name is invalid, it must be a single lower case word.');
7877
return;
7978
}
8079
json = {
81-
"service": json['service']
80+
"service": values['service'],
81+
"epsg": values['epsg']
8282
};
8383
}else{
8484
if (!this.istForm.getForm().isValid()){
8585
Ext.Msg.alert('Validation error', 'Please correct the invalid values');
8686
return;
8787
}
88+
json = Ext.apply(json, values);
8889
}
89-
90+
9091
if (Ext.isEmpty(this.mask)) {
9192
this.mask = new Ext.LoadMask(this.body, {
9293
msg:"Please wait..."
9394
});
9495
}
9596
this.mask.show();
96-
97+
9798
if (Ext.isEmpty(json.epsg)){
9899
delete json.epsg;
99100
}
100-
101+
101102
this.servicename = json['service'];
103+
102104
Ext.Ajax.request({
103105
url: Ext.String.format('{0}/istsos/services', wa.url),
104106
scope: this,

0 commit comments

Comments
 (0)