@@ -190,12 +190,6 @@ App.HTML.Build.user_entry = function(o, key)
190190 var tpl = App . Templates . get ( 'ENTRY' , 'user' ) ;
191191 tpl = App . HTML . setTplKeys ( tpl , o ) ;
192192
193- /*if (App.Constants.SUSPENDED_YES == o.SUSPENDED) {
194- var sub_tpl = App.Templates.get('SUSPENDED_TPL_SUSPENDED', 'general');
195- }
196- else {
197- var sub_tpl = App.Templates.get('SUSPENDED_TPL_NOT_SUSPENDED', 'general');
198- }*/
199193 tpl . set ( ':SUSPENDED_TPL' , '' ) ; //sub_tpl.finalize());
200194
201195 var ns = [ ] ;
@@ -225,13 +219,18 @@ App.HTML.Build.user_entry = function(o, key)
225219 tpl . set ( ':NS' , ns_custom . finalize ( ) ) ;
226220 }
227221
228-
222+ tpl . set ( ':REPORTS_ENABLED' , o . REPORTS_ENABLED == 'yes' ? 'enabled' : 'DISABLED' ) ;
223+
229224 return tpl . finalize ( ) ;
230225}
231226
232227
233228App . HTML . Build . user_form = function ( options , id )
234229{
230+ var in_edit = false ;
231+ if ( ! App . Helpers . isEmpty ( options ) ) {
232+ in_edit = true ;
233+ }
235234 if ( 'undefined' == typeof App . Env . initialParams ) {
236235 return alert ( 'Please wait a bit. Some background processes are not yet executed. Thank you for patience.' ) ;
237236 }
@@ -253,7 +252,7 @@ App.HTML.Build.user_form = function(options, id)
253252 // NS
254253 var ns = [ ] ;
255254 $ ( [ 3 , 4 , 5 , 6 , 7 , 8 ] ) . each ( function ( i , index )
256- { fb . warn ( options ) ;
255+ {
257256 if ( options [ 'NS' + index ] . trim ( ) != '' ) {
258257 var tpl_ns = App . Templates . get ( 'NS_INPUT' , 'user' ) ;
259258 tpl_ns . set ( ':NS_LABEL' , 'NS #' + ( index ) ) ;
@@ -264,7 +263,9 @@ App.HTML.Build.user_form = function(options, id)
264263 ns [ ns . length ++ ] = App . Templates . get ( 'PLUS_ONE_NS' , 'user' ) . finalize ( ) ;
265264
266265 tpl . set ( ':NS' , ns . done ( ) ) ;
267-
266+ if ( in_edit == true ) {
267+ options . PASSWORD = App . Settings . PASSWORD_IMMUTE ;
268+ }
268269 tpl = App . HTML . setTplKeys ( tpl , options , true ) ;
269270 tpl = App . HTML . Build . user_selects ( tpl , options ) ;
270271
@@ -287,7 +288,7 @@ App.HTML.Build.web_domain_entry = function(o, key)
287288 var tpl = App . Templates . get ( 'ENTRY' , 'web_domain' ) ;
288289 tpl = App . HTML . setTplKeys ( tpl , o ) ;
289290
290- if ( App . Constants . SUSPENDED_YES == o . SUSPENDED ) {
291+ if ( App . Constants . SUSPENDED_YES == o . SUSPEND ) {
291292 var sub_tpl = App . Templates . get ( 'SUSPENDED_TPL_SUSPENDED' , 'general' ) ;
292293 }
293294 else {
@@ -364,6 +365,10 @@ App.HTML.Build.db_entry = function(o, key)
364365
365366App . HTML . Build . db_form = function ( options , id )
366367{
368+ var in_edit = false ;
369+ if ( ! App . Helpers . isEmpty ( options ) ) {
370+ in_edit = true ;
371+ }
367372 if ( 'undefined' == typeof App . Env . initialParams ) {
368373 return alert ( 'PLease wait a bit. Some background processes are not yet executed. Thank you for patience.' ) ;
369374 }
@@ -380,11 +385,12 @@ App.HTML.Build.db_form = function(options, id)
380385 tpl . set ( ':save_button' , 'SAVE' ) ;
381386 }
382387
383- options = ! App . Helpers . isEmpty ( options ) ? options : { 'DB' :'' , 'USER' :'' , 'FORM' :'' , 'PASSWORD' : '' } ;
388+ options = ! App . Helpers . isEmpty ( options ) ? options : App . Empty . DB ;
389+ if ( in_edit == true ) {
390+ options . PASSWORD = App . Settings . PASSWORD_IMMUTE ;
391+ }
384392 tpl = App . HTML . setTplKeys ( tpl , options , true ) ;
385- tpl = App . HTML . Build . db_selects ( tpl , options ) ;
386-
387- tpl . set ( ':PASSWORD' , '' ) ;
393+ tpl = App . HTML . Build . db_selects ( tpl , options ) ;
388394
389395 return tpl . finalize ( ) ;
390396}
@@ -542,7 +548,7 @@ App.HTML.Build.db_selects = function(tpl, options)
542548App . HTML . Build . ip_selects = function ( tpl , options )
543549{
544550 // OWNER
545- var users = App . Env . initialParams . IP . SYS_USERS ;
551+ var users = App . Env . initialParams . IP . OWNER ;
546552 var opts = App . HTML . Build . options ( users , options . OWNER ) ;
547553 tpl . set ( ':owner_options' , opts ) ;
548554
0 commit comments