Author: eallen
Date: 2008-10-20 14:58:34 -0400 (Mon, 20 Oct 2008)
New Revision: 2660
Modified:
mgmt/trunk/cumin/python/wooly/forms.py
mgmt/trunk/cumin/python/wooly/forms.strings
Log:
Added ability to make type="button" instead of always type="submit"
Modified: mgmt/trunk/cumin/python/wooly/forms.py
===================================================================
--- mgmt/trunk/cumin/python/wooly/forms.py 2008-10-20 14:53:58 UTC (rev 2659)
+++ mgmt/trunk/cumin/python/wooly/forms.py 2008-10-20 18:58:34 UTC (rev 2660)
@@ -243,6 +243,9 @@
self.set(branch, True)
return super(FormButton, self).render_value(branch, *args)
+
+ def render_type(self, session, *args):
+ return "submit"
class CheckboxInputSet(FormInput, ItemSet):
def render_item_value(self, session, *args):
Modified: mgmt/trunk/cumin/python/wooly/forms.strings
===================================================================
--- mgmt/trunk/cumin/python/wooly/forms.strings 2008-10-20 14:53:58 UTC (rev 2659)
+++ mgmt/trunk/cumin/python/wooly/forms.strings 2008-10-20 18:58:34 UTC (rev 2660)
@@ -11,7 +11,7 @@
<li>{item_content}</li>
[FormButton.html]
-<button class="{class}" id="{id}" type="submit"
name="{name}" value="{value}" tabindex="{tab_index}"
{disabled_attr}>{content}</button>
+<button class="{class}" id="{id}" type="{type}"
name="{name}" value="{value}" tabindex="{tab_index}"
{disabled_attr}>{content}</button>
[ScalarInput.html]
<input type="text" name="{name}" value="{value}"
tabindex="{tab_index}" {disabled_attr} size="{size}"/>