From 6de0aab86c64d68578258139bea75cc6221882f7 Mon Sep 17 00:00:00 2001 From: ftimme <ft@falkotimme.com> Date: Wed, 07 Mar 2012 09:48:47 -0500 Subject: [PATCH] - Improved support for multiple PHP versions. Additional PHP versions have now their own form and database table. --- interface/web/sites/templates/web_domain_edit.htm | 24 +++++++++++++++++++++--- 1 files changed, 21 insertions(+), 3 deletions(-) diff --git a/interface/web/sites/templates/web_domain_edit.htm b/interface/web/sites/templates/web_domain_edit.htm index 064cf27..b15036f 100644 --- a/interface/web/sites/templates/web_domain_edit.htm +++ b/interface/web/sites/templates/web_domain_edit.htm @@ -167,11 +167,17 @@ reloadWebIP(); }); + if(jQuery('#php').val() == 'fast-cgi'){ + jQuery('.fastcgi_php_version:hidden').show(); + } else { + jQuery('.fastcgi_php_version:visible').hide(); + } jQuery('#php').change(function(){ + reloadFastcgiPHPVersions(); if(jQuery(this).val() == 'fast-cgi'){ - jQuery('.fastcgi_php_version').show(); + jQuery('.fastcgi_php_version:hidden').show(); } else { - jQuery('.fastcgi_php_version').hide(); + jQuery('.fastcgi_php_version:visible').hide(); } }); @@ -201,7 +207,19 @@ } function reloadFastcgiPHPVersions() { - loadOptionInto('fastcgi_php_version','sites/ajax_get_fastcgi_php_versions.php?server_id='+serverId+'&client_group_id='+clientGroupId); + jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {server_id : serverId, type : "getphpfastcgi"}, function(data) { + var options = '<option value="">Default</option>'; + var phpfastcgiselected = ''; + $.each(data, function(key, val) { + if($('#fastcgi_php_version').val() == key){ + phpfastcgiselected = ' selected="selected"'; + } else { + phpfastcgiselected = ''; + } + options += '<option value="'+key+'"'+phpfastcgiselected+'>'+val+'</option>'; + }); + $('#fastcgi_php_version').html(options); + }); } </script> -- Gitblit v1.9.1