All of lore.kernel.org
 help / color / mirror / Atom feed
From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/luci/cluster form-macros
Date: 26 Jan 2007 16:53:55 -0000	[thread overview]
Message-ID: <20070126165355.28807.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe at sourceware.org	2007-01-26 16:53:55

Modified files:
	luci/cluster   : form-macros 

Log message:
	confirm cluster (restart, start, stop, delete) and node (join, leave, fence, reboot, etc.) when selected

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.161&r2=1.162

--- conga/luci/cluster/form-macros	2007/01/25 21:03:47	1.161
+++ conga/luci/cluster/form-macros	2007/01/26 16:53:53	1.162
@@ -92,7 +92,7 @@
 		</td>
 
 		<td class="cluster cluster_action">
-			<form method="post" onSubmit="return dropdown(this.gourl)">
+			<form method="post">
 				<select name="gourl" id="cluster_action" class="cluster">
 					<option class="cluster running"
 						tal:condition="python: 'running' in cstatus and cstatus['running'] != 'true'"
@@ -116,7 +116,8 @@
 						Delete this cluster
 					</option>
 				</select>
-				<input class="cluster" type="submit" value="Go" />
+				<input class="cluster" type="button" value="Go"
+					onclick="if (this.form.gourl[this.form.gourl.selectedIndex].value && confirm(this.form.gourl[this.form.gourl.selectedIndex].text + '?')) return dropdown(this.form.gourl)" />
 			</form>
 		</td>
 	</tr>
@@ -2802,7 +2803,7 @@
 
 			<td class="cluster node node_action"
 				tal:condition="python: nodeinfo['nodestate'] == '0' or nodeinfo['nodestate'] == '1'">
-				<form method="post" onSubmit="return dropdown(this.gourl)">
+				<form method="post">
 				<select name="gourl">
 					<option value="">Choose a Task...</option>
 					<option tal:attributes="value nodeinfo/jl_url"
@@ -2820,18 +2821,20 @@
 						tal:condition="python: not 'ricci_error' in nodeinfo">
 						Delete this node</option>
 				</select>
-				<input type="submit" value="Go"/>
+				<input type="button" value="Go"
+					onclick="if (this.form.gourl[this.form.gourl.selectedIndex].value && confirm(this.form.gourl[this.form.gourl.selectedIndex].text + '?')) return dropdown(this.form.gourl)" />
 				</form>
 			</td>
 
 			<td class="cluster node node_action"
 				tal:condition="python: nodeinfo['nodestate'] != '0' and nodeinfo['nodestate'] != '1'">
-				<form method="post" onSubmit="return dropdown(this.gourl)">
+				<form method="post">
 				<select name="gourl">
 					<option value="">Choose a Task...</option>
 					<option tal:attributes="value nodeinfo/fence_url | nothing">Fence this node</option>
 				</select>
-				<input type="submit" value="Go"/>
+				<input type="button" value="Go"
+					onclick="if (this.form.gourl[this.form.gourl.selectedIndex].value && confirm(this.form.gourl[this.form.gourl.selectedIndex].text + '?')) return dropdown(this.form.gourl)" />
 				</form>
 			</td>
 		</tr>
@@ -3217,7 +3220,7 @@
 				</td>
 
 				<td class="node node_action" tal:condition="python: nd['status'] == '0' or nd['status'] == '1'">
-					<form method="post" onSubmit="return dropdown(this.gourl)">
+					<form method="post">
 						<select class="node" name="gourl">
 							<option value="">Choose a Task...</option>
 							<option tal:attributes="value nd/jl_url">
@@ -3228,18 +3231,20 @@
 							<option tal:attributes="value nd/fence_it_url">Fence this node</option>
 							<option tal:attributes="value nd/reboot_url">Reboot this node</option>
 							<option value="">----------</option>
-							<option tal:attributes="value nd/delete_url">Delete</option>
+							<option tal:attributes="value nd/delete_url">Delete this node</option>
 						</select>
-						<input type="submit" value="Go"/>
+						<input type="button" value="Go"
+							onclick="if (this.form.gourl[this.form.gourl.selectedIndex].value && confirm(this.form.gourl[this.form.gourl.selectedIndex].text + '?')) return dropdown(this.form.gourl)" />
 					</form>
 				</td>
 				<td class="node node_action" tal:condition="python: nd['status'] != '0' and nd['status'] != '1'">
-					<form method="post" onSubmit="return dropdown(this.gourl)">
+					<form method="post">
 						<select class="node" name="gourl">
 							<option value="">Choose a Task...</option>
 							<option tal:attributes="value nd/fence_it_url | nothing">Fence this node</option>
 						</select>
-						<input type="submit" value="Go"/>
+						<input type="button" value="Go"
+							onclick="if (this.form.gourl[this.form.gourl.selectedIndex].value && confirm(this.form.gourl[this.form.gourl.selectedIndex].text + '?')) return dropdown(this.form.gourl)" />
 					</form>
 				</td>
 			</tr>
@@ -3584,7 +3589,7 @@
 				</td>
 
 				<td class="cluster service service_action">
-					<form method="post" onSubmit="return dropdown(this.gourl)">
+					<form method="post">
 						<select name="gourl">
 							<option value="">Choose a Task...</option>
 							<option
@@ -3613,7 +3618,8 @@
 								tal:attributes="value svc/delurl | nothing"
 								tal:content="string:Delete this service" />
 						</select>
-						<input type="submit" value="Go"/>
+						<input type="button" value="Go"
+							onclick="if (this.form.gourl[this.form.gourl.selectedIndex].value && confirm(this.form.gourl[this.form.gourl.selectedIndex].text + '?')) return dropdown(this.form.gourl)" />
 					</form>
 				</td>
 			</tr>
@@ -3867,7 +3873,7 @@
 			</td>
 			<td class="cluster service service_action"
 				tal:condition="python: sinfo and 'innermap' in sinfo">
-				<form method="post" onSubmit="return dropdown(this.gourl)">
+				<form method="post">
 					<input type="hidden" name="pagetype" tal:attributes="
 						value request/pagetype | request/form/pagetype | nothing" />
 					<select name="gourl"
@@ -3892,7 +3898,8 @@
 								tal:content="string:Delete this service" />
 						</tal:block>
 					</select>
-					<input type="submit" value="Go"/>
+					<input type="button" value="Go"
+						onclick="if (this.form.gourl[this.form.gourl.selectedIndex].value && confirm(this.form.gourl[this.form.gourl.selectedIndex].text + '?')) return dropdown(this.form.gourl)" />
 				</form>
 			</td>
 		</tr>



             reply	other threads:[~2007-01-26 16:53 UTC|newest]

Thread overview: 94+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-26 16:53 rmccabe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-11-19 18:23 [Cluster-devel] conga/luci/cluster form-macros rmccabe
2007-08-09 20:26 rmccabe
2007-07-26 20:31 rmccabe
2007-06-12 15:33 rmccabe
2007-02-28 21:54 rmccabe
2007-02-28 21:42 rmccabe
2007-02-14 15:06 rmccabe
2007-02-14 15:04 rmccabe
2007-02-09 20:33 rmccabe
2007-02-09 20:32 rmccabe
2007-02-02  1:03 rmccabe
2007-01-30 21:39 jparsons
2007-01-30 21:06 jparsons
2007-01-24 20:05 rmccabe
2007-01-22 21:18 rmccabe
2007-01-16 17:38 rmccabe
2007-01-16 17:37 rmccabe
2007-01-15 18:57 rmccabe
2007-01-15 18:57 rmccabe
2007-01-15 17:17 rmccabe
2007-01-09 22:20 rmccabe
2007-01-07 17:36 rmccabe
2006-12-22 17:18 kupcevic
2006-12-20 22:07 jparsons
2006-12-20 20:24 jparsons
2006-12-18 22:15 jparsons
2006-12-13 23:55 rmccabe
2006-12-13 23:54 rmccabe
2006-12-04 22:59 rmccabe
2006-11-30 22:31 jparsons
2006-11-30 22:31 jparsons
2006-11-30 22:21 jparsons
2006-11-30 22:19 jparsons
2006-11-30 21:28 jparsons
2006-11-30 21:24 jparsons
2006-11-30 20:47 jparsons
2006-11-30 20:45 jparsons
2006-11-30 20:10 jparsons
2006-11-29 22:24 jparsons
2006-11-28 19:39 jparsons
2006-11-20 20:21 jparsons
2006-11-20 20:13 jparsons
2006-11-07  1:31 jparsons
2006-11-03 21:11 jparsons
2006-11-03 21:09 jparsons
2006-11-03 21:07 jparsons
2006-10-31 13:23 rmccabe
2006-10-16 20:34 jparsons
2006-10-16 18:58 rmccabe
2006-10-13 21:01 jparsons
2006-10-11 20:57 jparsons
2006-10-11 16:25 jparsons
2006-10-04 17:45 jparsons
2006-09-28 20:20 rmccabe
2006-09-25 15:59 rmccabe
2006-09-25 15:46 jparsons
2006-09-22 20:58 jparsons
2006-09-22 20:30 jparsons
2006-09-22 20:08 jparsons
2006-08-30 23:40 rmccabe
2006-08-30 22:57 rmccabe
2006-08-16 23:40 jparsons
2006-08-16 21:48 jparsons
2006-08-14 14:53 jparsons
2006-08-13 19:18 jparsons
2006-08-13 19:14 jparsons
2006-08-13 19:04 jparsons
2006-08-13 18:46 jparsons
2006-08-13 18:42 jparsons
2006-08-13 18:35 jparsons
2006-08-13 14:54 jparsons
2006-08-13 14:50 jparsons
2006-08-13 14:38 jparsons
2006-08-13 13:49 jparsons
2006-08-12 17:52 jparsons
2006-08-11 14:23 jparsons
2006-08-11 14:07 jparsons
2006-08-11  0:23 jparsons
2006-08-10 23:51 jparsons
2006-08-10 23:48 jparsons
2006-08-10 23:44 jparsons
2006-08-10 23:40 jparsons
2006-08-10 15:49 jparsons
2006-08-10 14:16 jparsons
2006-08-09 21:38 jparsons
2006-08-02 17:27 rmccabe
2006-08-01 15:43 jparsons
2006-07-28 19:49 jparsons
2006-07-25 20:17 jparsons
2006-07-25 17:40 jparsons
2006-07-24 20:10 jparsons
2006-07-21 17:16 jparsons
2006-07-14 16:09 jparsons

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070126165355.28807.qmail@sourceware.org \
    --to=rmccabe@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.