From 0ae667e6cfdd1bcc85bacf85cd93a84f99fa88f8 Mon Sep 17 00:00:00 2001
From: cfoe <cfoe@ispconfig3>
Date: Tue, 22 May 2012 04:08:05 -0400
Subject: [PATCH] added missing language string already present in default theme

---
 interface/web/sites/templates/web_domain_edit.htm |   30 +++++++++++++++++++++++++-----
 1 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/interface/web/sites/templates/web_domain_edit.htm b/interface/web/sites/templates/web_domain_edit.htm
index 064cf27..8a07871 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('#php').val() == 'php-fpm'){
+			jQuery('.fastcgi_php_version:hidden').show();
+		} else {
+			jQuery('.fastcgi_php_version:visible').hide();
+		}
 		jQuery('#php').change(function(){
-			if(jQuery(this).val() == 'fast-cgi'){
-				jQuery('.fastcgi_php_version').show();
+			reloadFastcgiPHPVersions();
+			if(jQuery(this).val() == 'fast-cgi' || jQuery(this).val() == 'php-fpm'){
+				jQuery('.fastcgi_php_version:hidden').show();
 			} else {
-				jQuery('.fastcgi_php_version').hide();
+				jQuery('.fastcgi_php_version:visible').hide();
 			}
 		});
 		
@@ -181,13 +187,15 @@
 					var selected = jQuery('#php').val();
 					jQuery('.apache').hide();
 					jQuery('.apache').hide();
+					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 != "fast-cgi") jQuery('#php option[value="fast-cgi"]').attr('selected', 'selected');
+					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();
@@ -201,7 +209,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, php_type : jQuery('#php').val(), 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