From 625f8d3ec41c986270d194efddd23f8584a6a49b Mon Sep 17 00:00:00 2001 From: "Milan P. Antonovic" Date: Mon, 17 Feb 2020 17:51:48 +0100 Subject: [PATCH] Fixed #54 --- interface/admin/www/app/view/newservice.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/interface/admin/www/app/view/newservice.js b/interface/admin/www/app/view/newservice.js index 4afc393b..38cc542b 100755 --- a/interface/admin/www/app/view/newservice.js +++ b/interface/admin/www/app/view/newservice.js @@ -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, @@ -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,