- Added options to disable combobox and load indicator in Interface Config (default is on).
- Bugfix: sys.ini and server.ini: if checkbox is not checked, write default value from tform file into database.
| | |
| | | dashboard_atom_url_reseller=http://www.ispconfig.org/atom |
| | | dashboard_atom_url_client=http://www.ispconfig.org/atom |
| | | monitor_key= |
| | | tab_change_discard=n |
| | | tab_change_warning=n |
| | | use_loadindicator=y |
| | | use_combobox=y |
| | | maintenance_mode=n |
| | |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n',1 => 'y') |
| | | ), |
| | | 'use_loadindicator' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'y', |
| | | 'value' => array(0 => 'n',1 => 'y') |
| | | ), |
| | | 'use_combobox' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'y', |
| | | 'value' => array(0 => 'n',1 => 'y') |
| | | ), |
| | | 'maintenance_mode' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | |
| | | $wb['smtp_user_txt'] = 'SMTP Benutzer'; |
| | | $wb['smtp_pass_txt'] = 'SMTP Passwort'; |
| | | $wb['smtp_crypt_txt'] = 'SSL/TLS verschlüsselte Verbindung für SMTP'; |
| | | $wb['use_combobox_txt'] = 'jQuery UI Combobox benutzen'; |
| | | $wb['use_loadindicator_txt'] = 'Laden-Grafik anzeigen'; |
| | | ?> |
| | |
| | | $wb['smtp_pass_txt'] = 'SMTP password'; |
| | | $wb['smtp_crypt_txt'] = 'Use SSL/TLS encrypted connection for SMTP'; |
| | | $wb['phpmyadmin_url_error_regex'] = 'Invalid phpmyadmin URL'; |
| | | $wb['use_combobox_txt'] = 'Use jQuery UI Combobox'; |
| | | ?> |
| | |
| | | $server_id = $this->id; |
| | | |
| | | $server_config_array = $app->getconf->get_server_config($server_id); |
| | | |
| | | foreach($app->tform->formDef['tabs'][$section]['fields'] as $key => $field) { |
| | | if ($field['formtype'] == 'CHECKBOX') { |
| | | if($this->dataRecord[$key] == '') { |
| | | // if a checkbox is not set, we set it to the unchecked value |
| | | $this->dataRecord[$key] = $field['value'][0]; |
| | | } |
| | | } |
| | | } |
| | | |
| | | $server_config_array[$section] = $app->tform->encode($this->dataRecord,$section); |
| | | $server_config_str = $app->ini_parser->get_ini_string($server_config_array); |
| | | |
| | |
| | | $section = $app->tform->getCurrentTab(); |
| | | |
| | | $server_config_array = $app->getconf->get_global_config(); |
| | | |
| | | foreach($app->tform->formDef['tabs'][$section]['fields'] as $key => $field) { |
| | | if ($field['formtype'] == 'CHECKBOX') { |
| | | if($this->dataRecord[$key] == '') { |
| | | // if a checkbox is not set, we set it to the unchecked value |
| | | $this->dataRecord[$key] = $field['value'][0]; |
| | | } |
| | | } |
| | | } |
| | | |
| | | $new_config = $app->tform->encode($this->dataRecord,$section); |
| | | if($section == 'sites' && $new_config['vhost_subdomains'] != 'y' && $server_config_array['vhost_subdomains'] == 'y') { |
| | | // check for existing vhost subdomains, if found the mode cannot be disabled |
| | |
| | | {tmpl_var name='tab_change_warning'}<br/>{tmpl_var name='tab_change_warning_note_txt'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='use_loadindicator_txt'}</p> |
| | | <div class="multiField"> |
| | | {tmpl_var name='use_loadindicator'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='use_combobox_txt'}</p> |
| | | <div class="multiField"> |
| | | {tmpl_var name='use_combobox'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='maintenance_mode_txt'}</p> |
| | | <div class="multiField"> |
| | |
| | | } |
| | | |
| | | function showLoadIndicator() { |
| | | jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {type : "get_use_loadindicator"}, function(data) { |
| | | if(data.useloadindicator == "y"){ |
| | | requestsRunning += 1; |
| | | |
| | | if(requestsRunning < 2) { |
| | |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function hideLoadIndicator() { |
| | | jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {type : "get_use_loadindicator"}, function(data) { |
| | | if(data.useloadindicator == "y"){ |
| | | requestsRunning -= 1; |
| | | if(requestsRunning < 1) { |
| | | requestsRunning = 0; // just for the case... |
| | | if(indicatorCompleted == true) jQuery('#ajaxloader').fadeOut('fast', function() { jQuery('#ajaxloader').hide(); } ); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function onAfterContentLoad() { |
| | | jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {type : "get_use_combobox"}, function(data) { |
| | | if(data.usecombobox == "y"){ |
| | | $('#pageContent').find("select").combobox(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function loadContentRefresh(pagename) { |
| | | |
| | |
| | | if(substr($json,-1) == ',') $json = substr($json,0,-1); |
| | | $json .= '}'; |
| | | } |
| | | |
| | | if($type == 'get_use_combobox'){ |
| | | $json = '{"usecombobox":"'; |
| | | $use_combobox = 'y'; |
| | | $server_config_array = $app->getconf->get_global_config(); |
| | | if($server_config_array['misc']['use_combobox'] != 'y') $use_combobox = 'n'; |
| | | $json .= $use_combobox; |
| | | unset($server_config_array); |
| | | $json .= '"}'; |
| | | } |
| | | |
| | | if($type == 'get_use_loadindicator'){ |
| | | $json = '{"useloadindicator":"'; |
| | | $use_loadindicator = 'y'; |
| | | $server_config_array = $app->getconf->get_global_config(); |
| | | if($server_config_array['misc']['use_loadindicator'] != 'y') $use_loadindicator = 'n'; |
| | | $json .= $use_loadindicator; |
| | | unset($server_config_array); |
| | | $json .= '"}'; |
| | | } |
| | | |
| | | //} |
| | | |