Author: eallen
Date: 2009-11-17 11:24:19 -0500 (Tue, 17 Nov 2009)
New Revision: 3714
Modified:
mgmt/trunk/wooly/python/wooly/forms.py
mgmt/trunk/wooly/python/wooly/forms.strings
Log:
Fix for
https://bugzilla.redhat.com/show_bug.cgi?id=537958 Rather than javascript, I put
the submit button first in the HTML and used css to display it after the Cancel button.
Modified: mgmt/trunk/wooly/python/wooly/forms.py
===================================================================
--- mgmt/trunk/wooly/python/wooly/forms.py 2009-11-16 20:39:58 UTC (rev 3713)
+++ mgmt/trunk/wooly/python/wooly/forms.py 2009-11-17 16:24:19 UTC (rev 3714)
@@ -497,14 +497,14 @@
self.return_url = Parameter(app, "return")
self.add_parameter(self.return_url)
+ self.submit_button = self.Submit(app, "submit")
+ self.submit_button.tab_index = 200
+ self.add_button(self.submit_button)
+
self.cancel_button = self.Cancel(app, "cancel")
self.cancel_button.tab_index = 201
self.add_button(self.cancel_button)
- self.submit_button = self.Submit(app, "submit")
- self.submit_button.tab_index = 200
- self.add_button(self.submit_button)
-
def submit(self, session):
self.submit_button.set(session, True)
Modified: mgmt/trunk/wooly/python/wooly/forms.strings
===================================================================
--- mgmt/trunk/wooly/python/wooly/forms.strings 2009-11-16 20:39:58 UTC (rev 3713)
+++ mgmt/trunk/wooly/python/wooly/forms.strings 2009-11-17 16:24:19 UTC (rev 3714)
@@ -53,6 +53,18 @@
return true;
}
+[FormButton.css]
+button.submit {
+ float:right;
+}
+button.submit:after {
+ content: ".";
+ display: block;
+ height: 0;
+ clear: right;
+ visibility: hidden;
+}
+
[FormButton.html]
<button class="{class}" type="{type}"
tabindex="{tab_index}" {disabled_attr} name="{name}"
value="{value}" onclick="return {onclick}('{name}',
'{value}')">{content}</button>