Make it easier to hide buttons for a form

This commit is contained in:
Lance Edgar 2018-02-07 19:28:54 -06:00
parent 9e9a5f9a6a
commit 00a3b8fc33

View file

@ -69,7 +69,7 @@ ${h.csrf_token(request)}
% if buttons:
${buttons|n}
% elif not readonly:
% elif not readonly and (buttons is Undefined or (buttons is not None and buttons is not False)):
<div class="buttons">
## ${h.submit('create', form.create_label if form.creating else form.update_label)}
${h.submit('save', getattr(form, 'save_label', "Save"))}