Use Form.submit_label if present, or fall back to save_label

latter should probably be deprecated / removed at some point
This commit is contained in:
Lance Edgar 2018-02-22 11:14:21 -06:00
parent e1a9da0716
commit 37a788a141

View file

@ -81,7 +81,7 @@ ${h.csrf_token(request)}
% 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"))}
${h.submit('save', getattr(form, 'submit_label', getattr(form, 'save_label', "Submit")))}
## % if form.creating and form.allow_successive_creates:
## ${h.submit('create_and_continue', form.successive_create_label)}
## % endif