Let forms choose *not* to auto-disable their cancel button

This commit is contained in:
Lance Edgar 2018-02-07 20:06:35 -06:00
parent 00a3b8fc33
commit c35bfa3e4e
2 changed files with 5 additions and 2 deletions

View file

@ -77,7 +77,7 @@ ${h.csrf_token(request)}
## ${h.submit('create_and_continue', form.successive_create_label)}
## % endif
% if getattr(form, 'show_cancel', True):
${h.link_to("Cancel", form.cancel_url, class_='button autodisable')}
${h.link_to("Cancel", form.cancel_url, class_='cancel button{}'.format(' autodisable' if form.auto_disable_cancel else ''))}
% endif
</div>
% endif