web_domain_edit.htm 7.63 KB
Newer Older
1
2
3
4
5
6
7
8
9
<h2><tmpl_var name="list_head_txt"></h2>
<p><tmpl_var name="list_desc_txt"></p>

<div class="panel panel_web_domain">

  <div class="pnl_formsarea">
    <fieldset class="inlineLabels">
      <tmpl_if name="is_admin">
      <div class="ctrlHolder">
10
11
12
13
14
15
16
17
		<tmpl_if name="edit_disabled">
		<label for="server_id_disabled">{tmpl_var name='server_id_txt'}</label>
		<select name="server_id_disabled" id="server_id_disabled" class="selectInput" disabled="disabled">
		  {tmpl_var name='server_id'}
		</select>
		<input type="hidden" name="server_id" value="{tmpl_var name='server_id_value'}" />
		<tmpl_else>
		<label for="server_id">{tmpl_var name='server_id_txt'}</label>
Falko Timme's avatar
Falko Timme committed
18
        <select name="server_id" id="server_id" class="selectInput">
19
20
21
		  {tmpl_var name='server_id'}
		</select>
		</tmpl_if>
22
23
24
      </div>
      <div class="ctrlHolder">
      	<label for="client_group_id">{tmpl_var name='client_group_id_txt'}</label>
Falko Timme's avatar
Falko Timme committed
25
        <select name="client_group_id" id="client_group_id" class="selectInput">
26
27
28
					{tmpl_var name='client_group_id'}
				</select>
      </div>
29
30
	  <tmpl_else>
		<input type="hidden" id="server_id" name="server_id" value="{tmpl_var name='server_id_value'}" />
31
32
33
34
      </tmpl_if>
      <tmpl_if name="is_reseller">
      <div class="ctrlHolder">
      	<label for="client_group_id">{tmpl_var name='client_group_id_txt'}</label>
Falko Timme's avatar
Falko Timme committed
35
        <select name="client_group_id" id="client_group_id" class="selectInput">
36
37
38
39
40
41
42
43
44
					{tmpl_var name='client_group_id'}
				</select>
      </div>
      </tmpl_if>
      <div class="ctrlHolder">
      	<label for="ip_address">{tmpl_var name='ip_address_txt'}</label>
        <select name="ip_address" id="ip_address" class="selectInput formLengthIPv4">
					{tmpl_var name='ip_address'}
				</select>
tbrehm's avatar
tbrehm committed
45
46
47
48
49
50
      </div>
	  <div class="ctrlHolder">
      	<label for="ipv6_address">{tmpl_var name='ipv6_address_txt'}</label>
        <select name="ipv6_address" id="ipv6_address" class="selectInput formLengthIPv4">
					{tmpl_var name='ipv6_address'}
				</select>
51
52
53
      </div>
      <div class="ctrlHolder">
      	<label for="domain">{tmpl_var name='domain_txt'}</label>
54
55
56
57
58
59
60
61
        <tmpl_if name="domain_option">
			<select name="domain" id="domain" class="selectInput">
					{tmpl_var name='domain_option'}
			</select>
		<tmpl_else>
	        <input name="domain" id="domain" value="{tmpl_var name='domain'}" size="30" maxlength="255" type="text" class="textInput" />
        </tmpl_if>
		</div>
62
63
      <div class="ctrlHolder">
      	<label for="hd_quota">{tmpl_var name='hd_quota_txt'}</label>
64
        <input name="hd_quota" id="hd_quota" value="{tmpl_var name='hd_quota'}" size="7" maxlength="7" type="text" class="textInput formLengthLimit" />&nbsp;MB
65
66
67
			</div>
      <div class="ctrlHolder">
      	<label for="traffic_quota">{tmpl_var name='traffic_quota_txt'}</label>
68
        <input name="traffic_quota" id="traffic_quota" value="{tmpl_var name='traffic_quota'}" size="7" maxlength="7" type="text" class="textInput formLengthLimit" />&nbsp;MB <tmpl_var name='traffic_quota_exceeded_txt'>
69
70
71
72
73
74
75
76
77
78
79
80
			</div>
      <div class="ctrlHolder">
				<p class="label">{tmpl_var name='cgi_txt'}</p>
					<div class="multiField">
						{tmpl_var name='cgi'}
					</div>
			</div>
      <div class="ctrlHolder">
				<p class="label">{tmpl_var name='ssi_txt'}</p>
					<div class="multiField">
						{tmpl_var name='ssi'}
					</div>
81
	  </div>
82
	  <div class="ctrlHolder apache">
83
84
85
86
87
				<p class="label">{tmpl_var name='ruby_txt'}</p>
					<div class="multiField">
						{tmpl_var name='ruby'}
					</div>
	  </div>
88
89
90
91
92
93
	  <div class="ctrlHolder apache">
				<p class="label">{tmpl_var name='python_txt'}</p>
					<div class="multiField">
						{tmpl_var name='python'}
					</div>
	  </div>
94
      <div class="ctrlHolder apache">
95
96
97
98
99
100
101
102
103
104
105
				<p class="label">{tmpl_var name='suexec_txt'}</p>
					<div class="multiField">
						{tmpl_var name='suexec'}
					</div>
			</div>
      <div class="ctrlHolder">
				<p class="label">{tmpl_var name='errordocs_txt'}</p>
					<div class="multiField">
						{tmpl_var name='errordocs'}
					</div>
			</div>
Falko Timme's avatar
Falko Timme committed
106

107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
      <div class="ctrlHolder">
      	<label for="subdomain">{tmpl_var name='subdomain_txt'}</label>
        <select name="subdomain" id="subdomain" class="selectInput formLengthHalf">
					{tmpl_var name='subdomain'}
				</select>
      </div>
      <div class="ctrlHolder">
				<p class="label">{tmpl_var name='ssl_txt'}</p>
					<div class="multiField">
						{tmpl_var name='ssl'}
					</div>
			</div>
      <div class="ctrlHolder">
      	<label for="php">{tmpl_var name='php_txt'}</label>
        <select name="php" id="php" class="selectInput formLengthHalf">
					{tmpl_var name='php'}
				</select>
124
125
126
127
128
129
      </div>
	  <div class="ctrlHolder fastcgi_php_version">
      	<label for="fastcgi_php_version">{tmpl_var name='fastcgi_php_version_txt'}</label>
        <select name="fastcgi_php_version" id="fastcgi_php_version" class="selectInput formLengthHalf">
					{tmpl_var name='fastcgi_php_version'}
				</select>
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
      </div>
      <div class="ctrlHolder">
				<p class="label">{tmpl_var name='active_txt'}</p>
					<div class="multiField">
						{tmpl_var name='active'}
					</div>
			</div>
    </fieldset>

    <input type="hidden" name="id" value="{tmpl_var name='id'}">

    <div class="buttonHolder buttons">
      <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onClick="submitForm('pageForm','sites/web_domain_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button>
      <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onClick="loadContent('sites/web_domain_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
    </div>
  </div>
  
</div>
Falko Timme's avatar
Falko Timme committed
148
149
<script language="JavaScript" type="text/javascript">
		var serverId;
Falko Timme's avatar
Falko Timme committed
150
		var clientGroupId = jQuery('#client_group_id').val();
Falko Timme's avatar
Falko Timme committed
151
152
153
154
155
156
157
		var serverIdDisabled = jQuery('#server_id_disabled').val();
		if(serverIdDisabled > 0){
			serverId = serverIdDisabled;
		} else {
			serverId = jQuery('#server_id').val();
			jQuery('#server_id').change(function(){
				serverId = $(this).val();
Falko Timme's avatar
Falko Timme committed
158
159
				adjustForm();
				reloadWebIP();
160
				reloadFastcgiPHPVersions();
Falko Timme's avatar
Falko Timme committed
161
162
			});
		}
Falko Timme's avatar
Falko Timme committed
163
		adjustForm();
Falko Timme's avatar
Falko Timme committed
164
		
Falko Timme's avatar
Falko Timme committed
165
166
167
168
169
		jQuery('#client_group_id').change(function(){
			clientGroupId = $(this).val();
			reloadWebIP();
		});
		
170
171
172
173
174
175
176
177
		jQuery('#php').change(function(){
			if(jQuery(this).val() == 'fast-cgi'){
				jQuery('.fastcgi_php_version').show();
			} else {
				jQuery('.fastcgi_php_version').hide();
			}
		});
		
Falko Timme's avatar
Falko Timme committed
178
		function adjustForm(){
Falko Timme's avatar
Falko Timme committed
179
180
181
			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();
182
183
					jQuery('.apache').hide();
					jQuery('.apache').hide();
Falko Timme's avatar
Falko Timme committed
184
185
186
187
188
					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');
				} else {
189
190
					jQuery('.apache').show();
					jQuery('.apache').show();
Falko Timme's avatar
Falko Timme committed
191
192
193
194
195
196
					jQuery('#php option[value="cgi"]').show();
					jQuery('#php option[value="mod"]').show();
					jQuery('#php option[value="suphp"]').show();
				}
			});
		}
tbrehm's avatar
tbrehm committed
197
198
		
		function reloadWebIP() {
Falko Timme's avatar
Falko Timme committed
199
200
			loadOptionInto('ip_address','sites/ajax_get_ip.php?ip_type=IPv4&server_id='+serverId+'&client_group_id='+clientGroupId);
			loadOptionInto('ipv6_address','sites/ajax_get_ip.php?ip_type=IPv6&server_id='+serverId+'&client_group_id='+clientGroupId);
tbrehm's avatar
tbrehm committed
201
		}
202
203
204
205
		
		function reloadFastcgiPHPVersions() {
			loadOptionInto('fastcgi_php_version','sites/ajax_get_fastcgi_php_versions.php?server_id='+serverId+'&client_group_id='+clientGroupId);
		}
Falko Timme's avatar
Falko Timme committed
206
207
			
</script>