@@ -12,8 +12,6 @@ Ext.define('istsos.view.newservice', {
12
12
}
13
13
this . mask . show ( ) ;
14
14
15
- console . dir ( this . getForm ( ) . getValues ( ) )
16
-
17
15
Ext . Ajax . request ( {
18
16
url : Ext . String . format ( '{0}/istsos/operations/validatedb' , wa . url ) ,
19
17
scope : this ,
@@ -69,36 +67,40 @@ Ext.define('istsos.view.newservice', {
69
67
} ) ;
70
68
} ,
71
69
operationPost : function ( ) {
72
-
73
- var json = this . istForm . getValues ( ) ;
70
+
71
+ var values = this . istForm . getValues ( ) ;
72
+ var json = { } ;
74
73
75
- if ( Ext . isEmpty ( json [ 'customdb' ] ) ) {
74
+ if ( Ext . isEmpty ( values [ 'customdb' ] ) ) {
76
75
if ( ! Ext . getCmp ( 'nsservice' ) . isValid ( ) ) {
77
76
Ext . Msg . alert ( 'Validation error' , 'Service name is invalid, it must be a single lower case word.' ) ;
78
77
return ;
79
78
}
80
79
json = {
81
- "service" : json [ 'service' ]
80
+ "service" : values [ 'service' ] ,
81
+ "epsg" : values [ 'epsg' ]
82
82
} ;
83
83
} else {
84
84
if ( ! this . istForm . getForm ( ) . isValid ( ) ) {
85
85
Ext . Msg . alert ( 'Validation error' , 'Please correct the invalid values' ) ;
86
86
return ;
87
87
}
88
+ json = Ext . apply ( json , values ) ;
88
89
}
89
-
90
+
90
91
if ( Ext . isEmpty ( this . mask ) ) {
91
92
this . mask = new Ext . LoadMask ( this . body , {
92
93
msg :"Please wait..."
93
94
} ) ;
94
95
}
95
96
this . mask . show ( ) ;
96
-
97
+
97
98
if ( Ext . isEmpty ( json . epsg ) ) {
98
99
delete json . epsg ;
99
100
}
100
-
101
+
101
102
this . servicename = json [ 'service' ] ;
103
+
102
104
Ext . Ajax . request ( {
103
105
url : Ext . String . format ( '{0}/istsos/services' , wa . url ) ,
104
106
scope : this ,
0 commit comments