Skip to contentSkip to conversation

conga/luci homebase/form-macros homebase/homeb ...

Cluster-devel [email protected] 1 participant 1 message Jul 11, 2007

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2007-07-11 22:47:08

Modified files:
luci/homebase : form-macros homebase_common.js
validate_cluster_add.js validate_cluster_add_initial.js validate_perm.js validate_sys_add.js validate_sys_remove.js validate_user_add.js validate_user_del.js
luci/cluster : fence_device.js form-macros
resource-form-macros resource_form_handlers.js validate_fence.js

Log message:
Fixes for MSIE support

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/form-macros.diff?cvsroot=cluster&r1=1.57&r2=1.58
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/homebase_common.js.diff?cvsroot=cluster&r1=1.17&r2=1.18
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/validate_cluster_add.js.diff?cvsroot=cluster&r1=1.9&r2=1.10
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/validate_cluster_add_initial.js.diff?cvsroot=cluster&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/validate_perm.js.diff?cvsroot=cluster&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/validate_sys_add.js.diff?cvsroot=cluster&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/validate_sys_remove.js.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/validate_user_add.js.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/validate_user_del.js.diff?cvsroot=cluster&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/fence_device.js.diff?cvsroot=cluster&r1=1.11&r2=1.12
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.200&r2=1.201
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/resource-form-macros.diff?cvsroot=cluster&r1=1.38&r2=1.39
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/resource_form_handlers.js.diff?cvsroot=cluster&r1=1.36&r2=1.37
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/validate_fence.js.diff?cvsroot=cluster&r1=1.7&r2=1.8

luci/homebase/form-macros +28 -27
@@ -69,7 +69,7 @@
 
 		<div class="hbSubmit" tal:condition="python:userList" id="hbSubmit">
 			<input name="Submit" type="button" value="Delete This User"
-				onClick="validateForm(this.form)" />
+				onclick="validateForm(this.form)" />
 		</div>
 	</form>
 
@@ -136,7 +136,7 @@
 
 		<div class="hbSubmit" id="hbSubmit">
 			<input name="Submit" type="button" value="Submit"
-				onClick="validateForm(this.form)" />
+				onclick="validateForm(this.form)" />
 		</div>
 	</form>
 </div>
@@ -189,7 +189,7 @@
 		<span tal:content="string:Select a User" /><br/>
 		
 		<select class="homebase" name="userList"
-			onChange="document.location = '/luci/homebase/?pagetype=3&user=' + this.form.userList.options[this.form.userList.selectedIndex].text">
+			onchange="document.location = '/luci/homebase/?pagetype=3&user=' + this.form.userList.options[this.form.userList.selectedIndex].text">
 			<tal:block tal:define="userlist python: perms">
 				<tal:block tal:repeat="user userlist">
 					<option class="homebase"
@@ -247,7 +247,7 @@
 		<div class="hbSubmit" id="hbSubmit">
 			<input type="button" name="Update Permissions"
 				value="Update Permissions"
-				onClick="validateForm(this.form)" />
+				onclick="validateForm(this.form)" />
 		</div>
 
 		</tal:block>
@@ -308,7 +308,7 @@
 					</tr>
 				</thead>
 			
-				<tbody class="systemsTable">
+				<tbody class="systemsTable" id="sys_tbody">
 					<tr class="systemsTable" id="__SYSTEM_ROW_0">
 						<td class="systemsTable">
 							<input class="hbInputSys" type="text"
@@ -320,7 +320,7 @@
 								id="__SYSTEM0:Passwd"
 								name="__SYSTEM0:Passwd"
 								class="hbInputPass"
-								onChange="pwd0Change(this.form)" />
+								onchange="pwd0Change(this.form)" />
 						</td>
 						<td class="systemsTable">
 							<img src="/luci/delete-row.png" class="deleteRow"
@@ -343,7 +343,7 @@
 				</thead>
 				<tal:block tal:define="global cur_sysnum python: 0" />
 
-				<tbody class="systemsTable">
+				<tbody class="systemsTable" id="sys_tbody">
 				<tal:block tal:repeat="cur_sys new_systems">
 					<tr class="systemsTable"
 						tal:attributes="
@@ -363,7 +363,7 @@
 							<input type="password"
 								autocomplete="off"
 								class="hbInputPass"
-								onChange="pwd0Change(this.form)"
+								onchange="pwd0Change(this.form)"
 								tal:attributes="
 									id python: '__SYSTEM%d:Passwd' % cur_sysnum;
 									name python: '__SYSTEM%d:Passwd' % cur_sysnum;
@@ -414,7 +414,7 @@
 						<li class="vanilla"
 							tal:attributes="id python: cur_sysnum < 2 and 'allSameDiv' or ''">
 							<input type="checkbox" name="allSameCheckBox"
-								id="allSameCheckBox" onClick="allPasswdsSame(this.form)" />
+								id="allSameCheckBox" onclick="allPasswdsSame(this.form)" />
 							Check if system passwords are identical.
 						</li>
 					</ul>
@@ -423,7 +423,7 @@
 				<tr class="systemsTable"><td class="systemsTable" colspan="2">
 					<div class="systemsTableEnd">
 						<input type="button" value="Add another entry"
-							onClick="addSystem(this.form)" />
+							onclick="addSystem(this.form)" />
 					</div>
 				</td></tr>
 			</tfoot>
@@ -436,7 +436,7 @@
 
 		<div class="hbSubmit" id="hbSubmit">
 			<input type="button" name="Submit" value="Submit"
-				onClick="validateAuth(this.form)" />
+				onclick="validateAuth(this.form)" />
 		</div>
 
 		<tal:block tal:condition="exists: request/SESSION/auth_status">
@@ -542,7 +542,7 @@
 
 		<div class="hbSubmit">
 			<input type="button" name="Submit" value="Remove selected entries"
-				onClick="validateForm(this.form)" />
+				onclick="validateForm(this.form)" />
 		</div>
 	</fieldset>
 	</form>
@@ -601,7 +601,7 @@
 					</tr>
 				</thead>
 			
-				<tbody class="systemsTable">
+				<tbody class="systemsTable" id="sys_tbody">
 					<tr class="systemsTable" id="__SYSTEM_ROW_0">
 						<td class="systemsTable">
 							<input class="hbInputSys" type="text"
@@ -613,7 +613,7 @@
 								id="__SYSTEM0:Passwd"
 								name="__SYSTEM0:Passwd"
 								class="hbInputPass"
-								onChange="pwd0Change(this.form)" />
+								onchange="pwd0Change(this.form)" />
 						</td>
 						<td class="systemsTable">
 							<img src="/luci/delete-row.png" class="deleteRow"
@@ -636,7 +636,7 @@
 				</thead>
 				<tal:block tal:define="global cur_sysnum python: 0" />
 
-				<tbody class="systemsTable">
+				<tbody class="systemsTable" id="sys_tbody">
 				<tal:block tal:repeat="cur_sys new_systems">
 					<tr class="systemsTable"
 						tal:attributes="
@@ -656,7 +656,7 @@
 							<input type="password"
 								autocomplete="off"
 								class="hbInputPass"
-								onChange="pwd0Change(this.form)"
+								onchange="pwd0Change(this.form)"
 								tal:attributes="
 									id python: '__SYSTEM%d:Passwd' % cur_sysnum;
 									name python: '__SYSTEM%d:Passwd' % cur_sysnum;
@@ -706,14 +706,14 @@
 								onchange="view_certs_only(this.form, this.checked)"
 								type="checkbox">View system certificates before sending any passwords.</li>
 						<li class="vanilla"
-							tal:attributes="id python: cur_sysnum < 2 and 'allSameDiv' or ''"><input type="checkbox" name="allSameCheckBox" id="allSameCheckBox" onClick="allPasswdsSame(this.form);"/>Check if storage system passwords are identical.</li>
+							tal:attributes="id python: cur_sysnum < 2 and 'allSameDiv' or ''"><input type="checkbox" name="allSameCheckBox" id="allSameCheckBox" onclick="allPasswdsSame(this.form);"/>Check if storage system passwords are identical.</li>
 					</ul>
 				</td></tr>
 
 				<tr class="systemsTable"><td class="systemsTable" colspan="2">
 					<div class="systemsTableEnd">
 						<input type="button" value="Add another entry"
-							onClick="addSystem(this.form)" />
+							onclick="addSystem(this.form)" />
 					</div>
 				</td></tr>
 			</tfoot>
@@ -724,7 +724,7 @@
 
 		<div class="hbSubmit" id="hbSubmit">
 			<input type="button" name="Submit" value="Submit"
-				onClick="validateForm(this.form)" />
+				onclick="validateForm(this.form)" />
 		</div>
 	</form>
 </div>
@@ -805,7 +805,7 @@
 						<li class="vanilla" id="allSameDiv">
 						<li class="vanilla" tal:condition="not: exists: add_cluster/complete">
 							<input type="checkbox" name="allSameCheckBox"
-								id="allSameCheckBox" onClick="allPasswdsSame(this.form)"
+								id="allSameCheckBox" onclick="allPasswdsSame(this.form)"
 								tal:attributes="checked python: add_cluster['identical_passwds'] and 'checked'"
 							/>
 							
@@ -823,7 +823,8 @@
 
 			<tal:block tal:define="global cur_sysnum python:0" />
 
-			<tbody class="systemsTable" tal:condition="add_cluster/nodes">
+			<tbody class="systemsTable" id="sys_tbody"
+				tal:condition="add_cluster/nodes">
 			 <tal:block tal:repeat="cur_sys add_cluster/nodes">
 				<tr class="systemsTable"
 					tal:define="sys python: add_cluster['nodes'][cur_sys]">
@@ -841,7 +842,7 @@
 						<tal:block tal:condition="not: exists: sys/auth">
 							<input type="password"
 								autocomplete="off"
-								onChange="pwd0Change(this.form)"
+								onchange="pwd0Change(this.form)"
 								tal:attributes="
 									value nothing;
 									class python: 'hbInputPass' + ('errors' in sys and ' error' or '');
@@ -850,7 +851,7 @@
 						</tal:block>
 
 						<tal:block tal:condition="exists: sys/auth">
-							<input type="text" onChange="pwd0Change(this.form)"
+							<input type="text" onchange="pwd0Change(this.form)"
 								disabled="disabled" value="[authenticated]"
 								tal:attributes="
 									class python: 'hbInputPass' + ('errors' in sys and ' error' or '');
@@ -889,7 +890,7 @@
 
 		<div class="hbSubmit" id="hbSubmit">
 			<input type="button" name="Submit" value="Add This Cluster"
-				onClick="validateForm(this.form)" />
+				onclick="validateForm(this.form)" />
 		</div>
 	</form>
 
@@ -958,7 +959,7 @@
 				</td></tr>
 			</tfoot>
 
-			<tbody class="systemsTable">
+			<tbody class="systemsTable" id="sys_tbody">
 				<tr class="systemsTable">
 					<td class="systemsTable">
 						<input class="hbInputSys" type="text"
@@ -968,7 +969,7 @@
 					</td>
 					<td class="systemsTable">
 						<input class="hbInputPass" type="password"
-							onChange="pwd0Change(this.form)"
+							onchange="pwd0Change(this.form)"
 							autocomplete="off"
 							id="__SYSTEM0:Passwd" name="__SYSTEM0:Passwd"
 							tal:attributes="
@@ -997,7 +998,7 @@
 
 		<div class="hbSubmit" id="hbSubmit">
 			<input type="button" name="Submit" value="Submit"
-				onClick="validateForm(this.form)" />
+				onclick="validateForm(this.form)" />
 		</div>
 	</form>
 </div>
luci/homebase/homebase_common.js +90 -55

333 lines not on this page · raw message

luci/homebase/validate_cluster_add.js +18 -10
@@ -1,8 +1,9 @@
 function validateForm(form) {
-	var errors = new Array();
+	var errors = [];
 
-	if (!form)
+	if (!form) {
 		return (-1);
+	}
 
 	var clustername = form.clustername;
 	if (!clustername || str_is_blank(clustername.value)) {
@@ -18,34 +19,41 @@
 			if (invalid_chars) {
 				errors.push('The cluster name you gave contains the following invalid characters: "' + invalid_chars + '".');
 				set_form_err(form.clustername);
-			} else
+			} else {
 				clr_form_err(form.clustername);
+			}
 		}
 	}
 
 	var added_storage = validate_systems(form, errors);
 
-	if (error_dialog(errors))
+	if (error_dialog(errors)) {
 		return (-1);
+	}
 
-	if (!added_storage || added_storage.length < 1)
+	if (!added_storage || added_storage.length < 1) {
 		errors.push('You have not added any cluster nodes.');
+	}
 
-	if (error_dialog(errors))
+	if (error_dialog(errors)) {
 		return (-1);
+	}
 
 	var view_certs = document.getElementById('view_certs');
 	if (!view_certs || !view_certs.checked) {
 		var confirm_str = '';
-		if (form.addnode)
+		if (form.addnode) {
 			confirm_str = 'Add ' + (added_storage.length > 1 ? 'these nodes' : 'this node') + ' to the \"' + clustername + '\" cluster?';
-		else
+		} else {
 			confirm_str = 'Add the cluster \"' + clustername + '\" to the Luci management interface?';
+		}
 
-		if (confirm(confirm_str))
+		if (confirm(confirm_str)) {
 			form.submit();
-	} else
+		}
+	} else {
 		form.submit();
+	}
 
 	return (0);
 }
luci/homebase/validate_cluster_add_initial.js +11 -5
@@ -1,22 +1,28 @@
 function validateForm(form) {
-	var errors = new Array();
+	var errors = [];
 
-	if (!form)
+	if (!form) {
 		return (-1);
+	}
 
 	var added_storage = validate_systems(form, errors);
 
-	if (error_dialog(errors))
+	if (error_dialog(errors)) {
 		return (-1);
+	}
 
-	if (!added_storage || added_storage.length < 1)
+	if (!added_storage || added_storage.length < 1) {
 		errors.push('You have not added any cluster nodes.');
+	}
 
-	if (error_dialog(errors))
+	if (error_dialog(errors)) {
 		return (-1);
+	}
 
 	if (confirm('Retrieve cluster information from ' + added_storage[0] + '?'))
+	{
 		form.submit();
+	}
 
 	return (0);
 }
luci/homebase/validate_perm.js +23 -13
@@ -1,48 +1,58 @@
 function validateForm(form) {
-	var errors = new Array();
+	var errors = [];
 
-	if (!form || !form.userList)
+	if (!form || !form.userList) {
 		return (-1);
+	}
 
 	var userIdx = form.userList.selectedIndex;
-	if (userIdx < 0 || !form.userList.options[userIdx].value)
+	if (userIdx < 0 || !form.userList.options[userIdx].value) {
 		errors.push('You have not selected a valid user.');
+	}
 
-	if (error_dialog(errors))
+	if (error_dialog(errors)) {
 		return (-1);
+	}
 
 	var username = form.userList.options[userIdx].value;
-	var selected_clusters = new Array();
-	var selected_storage = new Array();
+	var selected_clusters = [];
+	var selected_storage = [];
 
-	if (!form)
+	if (!form) {
 		return (-1);
+	}
 
 	var num_clusters = document.getElementById('numClusters').value;
 	for (var i = 0 ; i < num_clusters ; i++) {
 		var element = document.getElementById('__CLUSTER' + i);
-		if (!element || !element.value || !element.checked)
+		if (!element || !element.value || !element.checked) {
 			continue;
+		}
 		selected_clusters.push(element.value);
 	}
 
 	var num_storage = document.getElementById('numStorage').value;
 	for (var i = 0 ; i < num_storage ; i++) {
 		var element = document.getElementById('__SYSTEM' + i);
-		if (!element || !element.value || !element.checked)
+		if (!element || !element.value || !element.checked) {
 			continue;
+		}
 		selected_storage.push(element.value);
 	}
 
-	if (error_dialog(errors))
+	if (error_dialog(errors)) {
 		return (-1);
+	}
 
-	if (selected_clusters.length + selected_storage.length < 1)
+	var confirm_str = '';
+	if (selected_clusters.length + selected_storage.length < 1) {
 		confirm_str = 'Remove all permissions for ' + username + '?';
-	else
+	} else {
 		confirm_str = 'Modify permissions for ' + username + '?';
+	}
 
-	if (confirm(confirm_str))
+	if (confirm(confirm_str)) {
 		form.submit();
+	}
 	return (0);
 }
luci/homebase/validate_sys_add.js +5 -3
@@ -1,12 +1,14 @@
 function validateForm(form) {
-	var errors = new Array();
+	var errors = [];
 
-	if (!form)
+	if (!form) {
 		return (-1);
+	}
 
 	var added_storage = validate_systems(form, errors);
-	if (error_dialog(errors))
+	if (error_dialog(errors)) {
 		return (-1);
+	}
 
 	if (added_storage.length > 0 &&
 		confirm("Do you really want to add the following Storage Systems:\n" + added_storage.join('\n')))
luci/homebase/validate_sys_remove.js +28 -16

93 lines not on this page · raw message

luci/homebase/validate_user_add.js +10 -4
@@ -1,8 +1,9 @@
 function validateForm(form) {
-	var errors = new Array()
+	var errors = [];
 
-	if (!form)
+	if (!form) {
 		return (-1);
+	}
 
 	if (!form.newUserName || !form.newUserName.value) {
 		errors.push('You did not enter a user name.');
@@ -12,8 +13,9 @@
 		if (invalid) {
 			errors.push('The user name you specified contains the following invalid characters: "' + invalid + '"');
 			set_form_err(form.newUserName);
-		} else
+		} else {
 			clr_form_err(form.newUserName);
+		}
 	}
 
 	if (!form.newPassword || !form.newPassword.value) {
@@ -43,9 +45,13 @@
 		}
 	}
 
-	if (error_dialog(errors))
+	if (error_dialog(errors)) {
 		return (-1);
+	}
+
 	if (confirm('Do you really want to add the user \"' + form.newUserName.value + '\"?'))
+	{
 		form.submit();
+	}
 	return (0);
 }
luci/homebase/validate_user_del.js +6 -3
@@ -1,8 +1,9 @@
 function validateForm(form) {
-	var errors = new Array();
+	var errors = [];
 
-	if (!form || !form.deluserId)
+	if (!form || !form.deluserId) {
 		return (-1);
+	}
 
 	var userIdx = form.deluserId.selectedIndex;
 	if (userIdx <= 0 ||
@@ -13,8 +14,10 @@
 		return (-1);
 	}
 
-	if (error_dialog(errors))
+	if (error_dialog(errors)) {
 		return (-1);
+	}
+
 	if (confirm('Do you really want to remove the user \"' +
 		form.deluserId.options[userIdx].value + '\"?'))
 	{
luci/cluster/fence_device.js +40 -21

135 lines not on this page · raw message

luci/cluster/form-macros +17 -19
@@ -384,7 +384,7 @@
 
 			<tal:block tal:define="global cur_sysnum python:0" />
 
-			<tbody class="systemsTable">
+			<tbody class="systemsTable" id="sys_tbody">
 			 <tal:block
 				tal:condition="exists: add_cluster/nodes"
 				tal:repeat="cur_sys add_cluster/nodes">
@@ -404,7 +404,7 @@
 					<td class="systemsTable">
 						<tal:block tal:condition="not: exists: sys/auth">
 							<input type="password"
-								onChange="pwd0Change(this.form)"
+								onchange="pwd0Change(this.form)"
 								autocomplete="off"
 								tal:attributes="
 									value nothing;
@@ -414,7 +414,7 @@
 						</tal:block>
 
 						<tal:block tal:condition="exists: sys/auth">
-							<input type="text" onChange="pwd0Change(this.form)"
+							<input type="text" onchange="pwd0Change(this.form)"
 								disabled="disabled" value="[authenticated]"
 								tal:attributes="
 									class python: 'hbInputPass' + ('errors' in sys and ' error' or '');
@@ -461,9 +461,8 @@
 					</td>
 					<td class="systemsTable">
 						<input type="password"
-							onChange="pwd0Change(this.form)"
+							onchange="pwd0Change(this.form)"
 							class="hbInputPass" autocomplete="off"
-							onChange="pwd0Change(this.form)"
 							id="__SYSTEM0:Passwd" name="__SYSTEM0:Passwd" />
 					</td>
 					<td class="systemsTable">
@@ -480,7 +479,7 @@
 					</td>
 					<td class="systemsTable">
 						<input type="password"
-							onChange="pwd0Change(this.form)"
+							onchange="pwd0Change(this.form)"
 							class="hbInputPass" autocomplete="off"
 							id="__SYSTEM1:Passwd" name="__SYSTEM1:Passwd" />
 					</td>
@@ -498,7 +497,7 @@
 					</td>
 					<td class="systemsTable">
 						<input type="password"
-							onChange="pwd0Change(this.form)"
+							onchange="pwd0Change(this.form)"
 							class="hbInputPass" autocomplete="off"
 							id="__SYSTEM2:Passwd" name="__SYSTEM2:Passwd" />
 					</td>
@@ -609,7 +608,7 @@
 				</td></tr>
 			</thead>
 
-			<tbody class="systemsTable">
+			<tbody class="systemsTable" id="sys_tbody">
 				<tr class="systemsTable">
 					<td class="systemsTable">Cluster Name</td>
 					<td class="systemsTable">
@@ -943,7 +942,7 @@
 				</td></tr>
 			</thead>
 
-			<tbody class="systemsTable">
+			<tbody class="systemsTable" id="sys_tbody">
 				<tr class="systemsTable">
 					<td class="systemsTable">Post Fail <span tal:attributes="onclick python:'window.location.assign(\'./?pagetype=80&clustername=' + request['clustername'] + '\')'">Delay</span>
 					</td>
@@ -1009,7 +1008,7 @@
 				</td></tr>
 			</thead>
 
-			<tbody class="systemsTable">
+			<tbody class="systemsTable" id="sys_tbody">
 				<tr class="systemsTable">
 					<td class="systemsTable">
 						<input type="radio" name="mcast" value="False"
@@ -1093,7 +1092,7 @@
 				</td></tr>
 			</thead>
 
-			<tbody class="systemsTable">
+			<tbody class="systemsTable" id="sys_tbody">
 				<tr class="systemsTable" id="st_row"><td class="systemsTable" id="st_col">
 					<input type="radio" name="quorumd" value="False"
 						onClick="disableChildrenInput('quorumdisk');"
@@ -1314,7 +1313,7 @@
 					<th class="systemsTable">Lock Server</th>
 				</tr>
 			</thead>
-			<tbody>
+			<tbody id="sys_tbody">
 				<tal:block tal:repeat="c clusterinfo/gulm_lockservers">
 					<tr class="systemsTable">
 						<td class="systemsTable">
@@ -3274,7 +3273,7 @@
 
 	<div id="fence_selection_block" class="invisible">
 		<form name="main_fence_form">
-			<select name="select_div">
+			<select name="select_div" onchange="alert('ALERT')">
 				<option value="fence-form-new-device">------ Use an existing Fence Device ------</option>
 				<tal:block tal:repeat="f fencedevinfo/fencedevs">
 					<option class="shared_fencedev"
@@ -3731,7 +3730,7 @@
 
 			<tal:block tal:define="global cur_sysnum python:0" />
 
-			<tbody class="systemsTable">
+			<tbody class="systemsTable" id="sys_tbody">
 			 <tal:block
 				tal:condition="exists: add_cluster/nodes"
 				tal:repeat="cur_sys add_cluster/nodes">
@@ -3752,7 +3751,7 @@
 						<tal:block tal:condition="not: exists: sys/auth">
 							<input type="password"
 								autocomplete="off"
-								onChange="pwd0Change(this.form)"
+								onchange="pwd0Change(this.form)"
 								tal:attributes="
 									value nothing;
 									class python: 'hbInputPass' + ('errors' in sys and ' error' or '');
@@ -3761,7 +3760,7 @@
 						</tal:block>
 
 						<tal:block tal:condition="exists: sys/auth">
-							<input type="text" onChange="pwd0Change(this.form)"
+							<input type="text" onchange="pwd0Change(this.form)"
 								disabled="disabled" value="[authenticated]"
 								tal:attributes="
 									class python: 'hbInputPass' + ('errors' in sys and ' error' or '');
@@ -3808,9 +3807,8 @@
 					</td>
 					<td class="systemsTable">
 						<input type="password"
-							onChange="pwd0Change(this.form)"
+							onchange="pwd0Change(this.form)"
 							class="hbInputPass" autocomplete="off"
-							onChange="pwd0Change(this.form)"
 							id="__SYSTEM0:Passwd" name="__SYSTEM0:Passwd" />
 					</td>
 					<td class="systemsTable">
@@ -4976,7 +4974,7 @@
 			<td class="cluster node fence_main fence">
 				<form name="main_fence_form">
 					<select name="select_div"
-						onChange="swap_fence_div('fence_container',
+						onchange="swap_fence_div('fence_container',
 									this.options[this.selectedIndex].value)">
 						<tal:block metal:use-macro="here/form-macros/macros/shared-fence-option-list" />
 					</select>
luci/cluster/resource-form-macros +11 -12
@@ -102,8 +102,7 @@
 		<strong class="reshdr">Select a Resource Type</strong>
 	</p>
 
-	<p class="reshdr">
-		<form>
+	<form>
 		<select onChange="swap_div_elem(this.form.parentNode,
 									this.options[this.selectedIndex].value);">
 			<option name="blank" value="blank" checked>
@@ -128,8 +127,7 @@
 			<option name="SAPDatabase" value="SAPDatabase">SAP Database</option>
 			<option name="SAPInstance" value="SAPInstance">SAP Instance</option>
 		</select>
-		</form>
-	</p>
+	</form>
 
 	<div name="invisible" class="invisible">
 		<div name="blank">&nbsp;</div>
@@ -155,9 +153,10 @@
 <div metal:define-macro="service-compose-macro">
 	<p class="reshdr">
 		<strong class="reshdr">Add a new local resource</strong>
-		<form>
+	</p>
+	<form>
 		<select onChange="swap_div_elem(this.form.parentNode,
-							this.options[this.selectedIndex].value);">
+							this.options[this.selectedIndex].value)">
 			<option checked="checked">Select a resource type</option>
 			<option name="IP" value="IP">IP address</option>
 			<option name="FS" value="FS">File system</option>
@@ -177,20 +176,21 @@
 			<option name="SAPDatabase" value="SAPDatabase">SAP Database</option>
 			<option name="SAPInstance" value="SAPInstance">SAP Instance</option>
 		</select>
-		</form>
-	</p>
+	</form>
 
 	<p style="margin-left: +5em;margin-top:1em;"><strong>or</strong></p>
 	<p class="reshdr">
 		<strong class="reshdr">Use an existing global resource</strong>
 		<br/>
-		<form>
+	</p>
+
+	<form>
 		<input type="hidden" name="parent_uuid" value="" />
 		<input type="hidden" name="uuid" value="" />
 		<input type="hidden" name="tree_level" value="" />
 		<select id="gres_chooser"
 			onChange="swap_in_global_res('global_resources_block', this,
-						this.form.parentNode, this.form);">
+						this.form.parentNode, this.form)">
 			<option checked="checked">Select a resource name</option>
 			<tal:block
 				tal:repeat="gres global_resources">
@@ -200,8 +200,7 @@
 					tal:content="python: gres['name'] + ' (' + gres['type'].split(':')[0] + ')'" />
 			</tal:block>
 		</select>
-		</form>
-	</p>
+	</form>
 
 	<div name="invisible" class="invisible">
 		<div name="">&nbsp;</div>
luci/cluster/resource_form_handlers.js +3 -3
@@ -69,14 +69,14 @@
 	var divs = container.getElementsByTagName('div');
 
 	for (var i = 0 ; i < divs.length ; i++) {
-		if (!swap_in_elem && divs[i].getAttribute('name') == swap_in_name) {
+		if (divs[i].getAttribute('name') == swap_in_name) {
 			swap_in_elem = divs[i];
 			break;
 		}
 	}
-	if (!swap_in_elem)
+	if (!swap_in_elem) {
 		return (-1);
-
+	}
 	container.parentNode.replaceChild(swap_in_elem, container);
 }
 
luci/cluster/validate_fence.js +57 -34

216 lines not on this page · raw message