Add Form.mobile flag and set link button styles accordingly

This commit is contained in:
Lance Edgar 2018-02-22 11:12:51 -06:00
parent 046a70c5f6
commit ff7341d272
2 changed files with 7 additions and 2 deletions

View file

@ -80,7 +80,11 @@ ${h.csrf_token(request)}
<input type="reset" value="Reset" />
% endif
% if getattr(form, 'show_cancel', True):
${h.link_to("Cancel", form.cancel_url, class_='cancel button{}'.format(' autodisable' if form.auto_disable_cancel else ''))}
% if form.mobile:
${h.link_to("Cancel", form.cancel_url, class_='ui-btn ui-corner-all')}
% else:
${h.link_to("Cancel", form.cancel_url, class_='cancel button{}'.format(' autodisable' if form.auto_disable_cancel else ''))}
% endif
% endif
</div>
% endif