Let each form define its "save" button text
where applicable etc.
This commit is contained in:
parent
6cc509f5b4
commit
7730080afc
|
@ -320,6 +320,7 @@ class Form(object):
|
||||||
"""
|
"""
|
||||||
Base class for all forms.
|
Base class for all forms.
|
||||||
"""
|
"""
|
||||||
|
save_label = "Save"
|
||||||
update_label = "Save"
|
update_label = "Save"
|
||||||
show_cancel = True
|
show_cancel = True
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ ${h.csrf_token(request)}
|
||||||
% elif not readonly:
|
% elif not readonly:
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
## ${h.submit('create', form.create_label if form.creating else form.update_label)}
|
## ${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:
|
## % if form.creating and form.allow_successive_creates:
|
||||||
## ${h.submit('create_and_continue', form.successive_create_label)}
|
## ${h.submit('create_and_continue', form.successive_create_label)}
|
||||||
## % endif
|
## % endif
|
||||||
|
|
Loading…
Reference in a new issue