equal
deleted
inserted
replaced
362 self.render_text_input(name, value), |
362 self.render_text_input(name, value), |
363 |
363 |
364 tags.script("$(document).ready(function () { $('#" + name + "').formEnabledBy($('#" + checkbox_name + "')); });") |
364 tags.script("$(document).ready(function () { $('#" + name + "').formEnabledBy($('#" + checkbox_name + "')); });") |
365 ) |
365 ) |
366 |
366 |
|
367 def render_reset_button (self, value, return_url=None) : |
|
368 """ |
|
369 Render HTML for a <input type="reset"> that abandons the form and returns the user to a page when pressed. |
|
370 |
|
371 value - button title |
|
372 return_url - (optional) URL to redirect user back to when button is pressed |
|
373 """ |
|
374 |
|
375 return tags.input(type='reset', value=value, |
|
376 onclick = ( |
|
377 "$.redirect('" + return_url + "')" |
|
378 ) if return_url else None, |
|
379 ) |
|
380 |
367 |
381 |
368 def render_form_field (self, name, title, description, inputs) : |
382 def render_form_field (self, name, title, description, inputs) : |
369 """ |
383 """ |
370 Render the label, input control, error note and description for a single field, along with their containing <li>. |
384 Render the label, input control, error note and description for a single field, along with their containing <li>. |
371 """ |
385 """ |