##// END OF EJS Templates
fixes #65, Added reset buttons to edit forms
marcink -
r698:4cd0709b beta
parent child Browse files
Show More
@@ -25,6 +25,17 b' from webhelpers.text import chop_at, col'
25 replace_whitespace, urlify, truncate, wrap_paragraphs
25 replace_whitespace, urlify, truncate, wrap_paragraphs
26 from webhelpers.date import time_ago_in_words
26 from webhelpers.date import time_ago_in_words
27
27
28 from webhelpers.html.tags import _set_input_attrs, _set_id_attr, \
29 convert_boolean_attrs, NotGiven
30
31 def _reset(name, value=None, id=NotGiven, type="reset", **attrs):
32 _set_input_attrs(attrs, type, name, value)
33 _set_id_attr(attrs, id, name)
34 convert_boolean_attrs(attrs, ["disabled"])
35 return HTML.input(**attrs)
36
37 reset = _reset
38
28 #Custom helpers here :)
39 #Custom helpers here :)
29 class _Link(object):
40 class _Link(object):
30 '''
41 '''
@@ -149,7 +149,8 b''
149 </div>
149 </div>
150
150
151 <div class="buttons">
151 <div class="buttons">
152 ${h.submit('save','save',class_="ui-button ui-widget ui-state-default ui-corner-all")}
152 ${h.submit('save','Save',class_="ui-button ui-widget ui-state-default ui-corner-all")}
153 ${h.reset('reset','Reset',class_="ui-button ui-widget ui-state-default ui-corner-all")}
153 </div>
154 </div>
154 </div>
155 </div>
155 </div>
156 </div>
@@ -42,7 +42,7 b''
42 </div>
42 </div>
43
43
44 <div class="buttons">
44 <div class="buttons">
45 ${h.submit('rescan','rescan repositories',class_="ui-button ui-widget ui-state-default ui-corner-all")}
45 ${h.submit('rescan','Rescan repositories',class_="ui-button ui-widget ui-state-default ui-corner-all")}
46 </div>
46 </div>
47 </div>
47 </div>
48 </div>
48 </div>
@@ -67,7 +67,7 b''
67 </div>
67 </div>
68
68
69 <div class="buttons">
69 <div class="buttons">
70 ${h.submit('reindex','reindex',class_="ui-button ui-widget ui-state-default ui-corner-all")}
70 ${h.submit('reindex','Reindex',class_="ui-button ui-widget ui-state-default ui-corner-all")}
71 </div>
71 </div>
72 </div>
72 </div>
73 </div>
73 </div>
@@ -99,7 +99,8 b''
99 </div>
99 </div>
100
100
101 <div class="buttons">
101 <div class="buttons">
102 ${h.submit('save','save settings',class_="ui-button ui-widget ui-state-default ui-corner-all")}
102 ${h.submit('save','Save settings',class_="ui-button ui-widget ui-state-default ui-corner-all")}
103 ${h.reset('reset','Reset',class_="ui-button ui-widget ui-state-default ui-corner-all")}
103 </div>
104 </div>
104 </div>
105 </div>
105 </div>
106 </div>
@@ -161,7 +162,8 b''
161 </div>
162 </div>
162
163
163 <div class="buttons">
164 <div class="buttons">
164 ${h.submit('save','save settings',class_="ui-button ui-widget ui-state-default ui-corner-all")}
165 ${h.submit('save','Save settings',class_="ui-button ui-widget ui-state-default ui-corner-all")}
166 ${h.reset('reset','Reset',class_="ui-button ui-widget ui-state-default ui-corner-all")}
165 </div>
167 </div>
166 </div>
168 </div>
167 </div>
169 </div>
@@ -101,7 +101,8 b''
101 </div>
101 </div>
102 </div>
102 </div>
103 <div class="buttons">
103 <div class="buttons">
104 ${h.submit('save','save',class_="ui-button ui-widget ui-state-default ui-corner-all")}
104 ${h.submit('save','Save',class_="ui-button ui-widget ui-state-default ui-corner-all")}
105 ${h.reset('reset','Reset',class_="ui-button ui-widget ui-state-default ui-corner-all")}
105 </div>
106 </div>
106 </div>
107 </div>
107 </div>
108 </div>
@@ -71,7 +71,11 b''
71 </div>
71 </div>
72
72
73 <div class="buttons">
73 <div class="buttons">
74 ${h.submit('save','save',class_="ui-button ui-widget ui-state-default ui-corner-all")}
74 ${h.submit('save','Save',class_="ui-button ui-widget ui-state-default ui-corner-all")}
75 ${h.reset('reset','Reset',class_="ui-button ui-widget ui-state-default ui-corner-all")}
76
77
78
75 </div>
79 </div>
76 </div>
80 </div>
77 </div>
81 </div>
@@ -128,7 +128,8 b''
128 </div>
128 </div>
129
129
130 <div class="buttons">
130 <div class="buttons">
131 ${h.submit('update','update',class_="ui-button ui-widget ui-state-default ui-corner-all")}
131 ${h.submit('update','Update',class_="ui-button ui-widget ui-state-default ui-corner-all")}
132 ${h.reset('reset','Reset',class_="ui-button ui-widget ui-state-default ui-corner-all")}
132 </div>
133 </div>
133 </div>
134 </div>
134 </div>
135 </div>
General Comments 0
You need to be logged in to leave comments. Login now