From d9bcf68e395d6156645a7974b1a992aa6e6c00aa Mon Sep 17 00:00:00 2001 From: Marius Cramer <m.cramer@pixcept.de> Date: Mon, 14 Oct 2013 08:57:25 -0400 Subject: [PATCH] Added missing empty directories from svn import --- interface/web/sites/templates/web_vhost_subdomain_edit.htm | 47 +++++++++++++++++++++++++++++------------------ 1 files changed, 29 insertions(+), 18 deletions(-) diff --git a/interface/web/sites/templates/web_vhost_subdomain_edit.htm b/interface/web/sites/templates/web_vhost_subdomain_edit.htm index ce89c84..8070e00 100644 --- a/interface/web/sites/templates/web_vhost_subdomain_edit.htm +++ b/interface/web/sites/templates/web_vhost_subdomain_edit.htm @@ -34,10 +34,6 @@ <input name="web_folder" id="web_folder" value="{tmpl_var name='web_folder'}" size="30" maxlength="100" type="text" class="textInput formLengthHalf"<tmpl_if name='fixed_folder' op='==' value='y'> readonly="readonly"</tmpl_if> /> </div> <div class="ctrlHolder"> - <label for="hd_quota">{tmpl_var name='hd_quota_txt'}</label> - <input name="hd_quota" id="hd_quota" value="{tmpl_var name='hd_quota'}" size="7" maxlength="7" type="text" class="textInput formLengthLimit" /> MB - </div> - <div class="ctrlHolder"> <label for="traffic_quota">{tmpl_var name='traffic_quota_txt'}</label> <input name="traffic_quota" id="traffic_quota" value="{tmpl_var name='traffic_quota'}" size="7" maxlength="7" type="text" class="textInput formLengthLimit" /> MB <tmpl_var name='traffic_quota_exceeded_txt'> </div> @@ -140,8 +136,7 @@ reloadFastcgiPHPVersions(); }); } - adjustForm(); - reloadFastcgiPHPVersions(); + reloadServerId(true); jQuery('#client_group_id').change(function(){ clientGroupId = $(this).val(); @@ -161,25 +156,44 @@ jQuery('.fastcgi_php_version:visible').hide(); } }); - - function adjustForm(){ + jQuery('#parent_domain_id').change(function() { + reloadServerId(false); + }); + + function reloadServerId(noFormChange) { + var parentWebId = jQuery('#parent_domain_id').val(); + jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {web_id : parentWebId, type : "getserverid"}, function(data) { + if(data.serverid) serverId = data.serverid; + adjustForm(noFormChange); + if(noFormChange) reloadFastcgiPHPVersions(noFormChange); + }); + } + + function adjustForm(noFormChange){ jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {server_id : serverId, type : "getservertype"}, function(data) { if(data.servertype == "nginx"){ var selected = jQuery('#php').val(); jQuery('.apache').hide(); - jQuery('.apache').hide(); + if(selected != "no" && selected != "php-fpm") { + jQuery('#php option[value="php-fpm"]').attr('selected', 'selected').val('php-fpm'); + } jQuery('#php option[value="fast-cgi"]').hide(); jQuery('#php option[value="cgi"]').hide(); jQuery('#php option[value="mod"]').hide(); jQuery('#php option[value="suphp"]').hide(); - if(selected != "no" && selected != "php-fpm") jQuery('#php option[value="php-fpm"]').attr('selected', 'selected'); } else { - jQuery('.apache').show(); jQuery('.apache').show(); jQuery('#php option[value="fast-cgi"]').show(); jQuery('#php option[value="cgi"]').show(); jQuery('#php option[value="mod"]').show(); jQuery('#php option[value="suphp"]').show(); + } + if(noFormChange) { + resetFormChanged(); + jQuery('#php').addClass('no-page-form-change').change(); + jQuery('#php').removeClass('no-page-form-change'); + } else { + jQuery('#php').change(); } }); } @@ -189,7 +203,7 @@ loadOptionInto('ipv6_address','sites/ajax_get_ip.php?ip_type=IPv6&server_id='+serverId+'&client_group_id='+clientGroupId); } - function reloadFastcgiPHPVersions() { + function reloadFastcgiPHPVersions(noFormChange) { jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {server_id : serverId, php_type : jQuery('#php').val(), type : "getphpfastcgi"}, function(data) { var options = '<option value="">Default</option>'; var phpfastcgiselected = ''; @@ -201,17 +215,14 @@ } options += '<option value="'+key+'"'+phpfastcgiselected+'>'+val+'</option>'; }); - $('#fastcgi_php_version').html(options); + $('#fastcgi_php_version').html(options).change(); + if(noFormChange) resetFormChanged(); }); } <tmpl_if name="readonly_tab"> - jQuery('div.panel_web_domain').find('fieldset').find('input,select,button').attr('disabled', 'disabled'); - jQuery('div.tabbox_tabs').find('a').click(function() { - jQuery('div.panel_web_domain').find('fieldset').find('input,select,button').removeAttr('disabled'); - }); + jQuery('div.panel_web_domain').find('fieldset').find('input,select,button').bind('click mousedown', function(e) { e.preventDefault(); }).focus(function() { $(this).blur(); }); jQuery('#dom-edit-submit').click(function() { - jQuery('div.panel_web_domain').find('fieldset').find('input,select,button').removeAttr('disabled'); submitForm('pageForm','sites/web_vhost_subdomain_edit.php'); }); <tmpl_else> -- Gitblit v1.9.1