@@ -83,7 +83,7 @@ App.HTML.Build.dns_form = function(options, id)
8383 }
8484
8585 tpl . set ( ':id' , id || '' ) ;
86- tpl . set ( ':DNS_DOMAIN' , options . DNS_DOMAIN || '' ) ;
86+ tpl . set ( ':DNS_DOMAIN' , options . DNS_DOMAIN || '' ) ;
8787 tpl . set ( ':IP' , options . IP || '' ) ;
8888 tpl . set ( ':TTL' , options . TTL || '' ) ;
8989 tpl . set ( ':SOA' , options . SOA || '' ) ;
@@ -197,10 +197,10 @@ App.HTML.Build.user_entry = function(o, key)
197197 var sub_tpl = App.Templates.get('SUSPENDED_TPL_NOT_SUSPENDED', 'general');
198198 }*/
199199 tpl . set ( ':SUSPENDED_TPL' , '' ) ; //sub_tpl.finalize());
200-
200+
201201 var ns = [ ] ;
202202 var ns_full = [ ] ;
203- fb . info ( o ) ;
203+
204204 $ ( [ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ] ) . each ( function ( i , index )
205205 {
206206 if ( o [ 'NS' + index ] . trim ( ) != '' ) {
@@ -233,7 +233,7 @@ App.HTML.Build.user_entry = function(o, key)
233233App . HTML . Build . user_form = function ( options , id )
234234{
235235 if ( 'undefined' == typeof App . Env . initialParams ) {
236- return alert ( 'PLease wait a bit. Some background processes are not yet executed. Thank you for patience.' ) ;
236+ return alert ( 'Please wait a bit. Some background processes are not yet executed. Thank you for patience.' ) ;
237237 }
238238 var tpl = App . Templates . get ( 'FORM' , 'user' ) ;
239239 tpl . set ( ':source' , options ) ;
@@ -268,6 +268,13 @@ App.HTML.Build.user_form = function(options, id)
268268 tpl = App . HTML . setTplKeys ( tpl , options , true ) ;
269269 tpl = App . HTML . Build . user_selects ( tpl , options ) ;
270270
271+ if ( options . REPORTS_ENABLED == 'yes' ) {
272+ tpl . set ( ':CHECKED' , 'checked="checked"' ) ;
273+ }
274+ else {
275+ tpl . set ( ':CHECKED' , '' ) ;
276+ }
277+
271278 return tpl . finalize ( ) ;
272279}
273280
@@ -301,18 +308,18 @@ App.HTML.Build.web_domain_form = function(options, id)
301308 tpl . set ( ':id' , id || '' ) ;
302309 options = App . Helpers . evalJSON ( options ) || { } ;
303310 if ( App . Helpers . isEmpty ( options ) ) {
304- tpl . set ( ':title' , 'New user ' ) ;
311+ tpl . set ( ':title' , 'New WEB domain ' ) ;
305312 tpl . set ( ':save_button' , 'ADD' ) ;
306313 }
307314 else {
308- tpl . set ( ':title' , 'Edit user ' ) ;
315+ tpl . set ( ':title' , 'Edit WEB domain ' ) ;
309316 tpl . set ( ':save_button' , 'SAVE' ) ;
310317 }
311318
312- options = ! App . Helpers . isEmpty ( options ) ? options : { 'CONTACT' : '' , 'PASSWORD' : '' , 'LOGIN_NAME' : '' , 'NS' : '' } ;
319+ options = ! App . Helpers . isEmpty ( options ) ? options : App . Empty . WEB_DOMAIN ;
313320
314321 tpl = App . HTML . setTplKeys ( tpl , options , true ) ;
315- tpl = App . HTML . Build . user_selects ( tpl , options ) ;
322+ tpl = App . HTML . Build . web_domain_selects ( tpl , options ) ;
316323
317324 return tpl . finalize ( ) ;
318325}
@@ -373,11 +380,12 @@ App.HTML.Build.db_form = function(options, id)
373380 tpl . set ( ':save_button' , 'SAVE' ) ;
374381 }
375382
376- options = ! App . Helpers . isEmpty ( options ) ? options : { 'DB' :'' , 'USER' :'' , 'FORM' :'' , 'PASSWORD' : '' } ;
377-
383+ options = ! App . Helpers . isEmpty ( options ) ? options : { 'DB' :'' , 'USER' :'' , 'FORM' :'' , 'PASSWORD' : '' } ;
378384 tpl = App . HTML . setTplKeys ( tpl , options , true ) ;
379385 tpl = App . HTML . Build . db_selects ( tpl , options ) ;
380386
387+ tpl . set ( ':PASSWORD' , '' ) ;
388+
381389 return tpl . finalize ( ) ;
382390}
383391
@@ -559,7 +567,27 @@ App.HTML.Build.dns_selects = function(tpl, options)
559567 tpl . set ( ':TPL_DEFAULT_VALUE' , options . TPL || App . Helpers . getFirstKey ( obj ) ) ;
560568 }
561569 catch ( e ) {
562- return '' ;
570+ return tpl ;
571+ }
572+
573+ return tpl ;
574+ }
575+
576+ App . HTML . Build . web_domain_selects = function ( tpl , options )
577+ {
578+ try {
579+ // IP
580+ var obj = App . Env . initialParams . WEB_DOMAIN . IP ;
581+ var opts = App . HTML . Build . options ( obj , options . IP ) ;
582+ tpl . set ( ':IP_OPTIONS' , opts ) ;
583+
584+ // TPL
585+ var obj = App . Env . initialParams . WEB_DOMAIN . TPL ;
586+ var opts = App . HTML . Build . options ( obj , options . TPL ) ;
587+ tpl . set ( ':TPL_OPTIONS' , opts ) ;
588+ }
589+ catch ( e ) {
590+ return tpl ;
563591 }
564592
565593 return tpl ;
0 commit comments