Skip to content

Commit

Permalink
Fixed #54
Browse files Browse the repository at this point in the history
  • Loading branch information
mantonovic committed Feb 17, 2020
1 parent 86f72d9 commit 625f8d3
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions interface/admin/www/app/view/newservice.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ Ext.define('istsos.view.newservice', {
}
this.mask.show();

console.dir(this.getForm().getValues())

Ext.Ajax.request({
url: Ext.String.format('{0}/istsos/operations/validatedb', wa.url),
scope: this,
Expand Down Expand Up @@ -69,36 +67,40 @@ Ext.define('istsos.view.newservice', {
});
},
operationPost: function(){

var json = this.istForm.getValues();

var values = this.istForm.getValues();
var json = {};

if (Ext.isEmpty(json['customdb'])) {
if (Ext.isEmpty(values['customdb'])) {
if (!Ext.getCmp('nsservice').isValid()){
Ext.Msg.alert('Validation error', 'Service name is invalid, it must be a single lower case word.');
return;
}
json = {
"service": json['service']
"service": values['service'],
"epsg": values['epsg']
};
}else{
if (!this.istForm.getForm().isValid()){
Ext.Msg.alert('Validation error', 'Please correct the invalid values');
return;
}
json = Ext.apply(json, values);
}

if (Ext.isEmpty(this.mask)) {
this.mask = new Ext.LoadMask(this.body, {
msg:"Please wait..."
});
}
this.mask.show();

if (Ext.isEmpty(json.epsg)){
delete json.epsg;
}

this.servicename = json['service'];

Ext.Ajax.request({
url: Ext.String.format('{0}/istsos/services', wa.url),
scope: this,
Expand Down

0 comments on commit 625f8d3

Please sign in to comment.