Let each form define its "save" button text

where applicable etc.
This commit is contained in:
Lance Edgar 2018-02-05 16:53:17 -06:00
parent 6cc509f5b4
commit 7730080afc
2 changed files with 2 additions and 1 deletions

View file

@ -320,6 +320,7 @@ class Form(object):
"""
Base class for all forms.
"""
save_label = "Save"
update_label = "Save"
show_cancel = True

View file

@ -72,7 +72,7 @@ ${h.csrf_token(request)}
% elif not readonly:
<div class="buttons">
## ${h.submit('create', form.create_label if form.creating else form.update_label)}
${h.submit('save', "Save")}
${h.submit('save', getattr(form, 'save_label', "Save"))}
## % if form.creating and form.allow_successive_creates:
## ${h.submit('create_and_continue', form.successive_create_label)}
## % endif