mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-03 15:38:59 +00:00
Control the headline of forms to say "New" and "Edit" depending
on what we're actually doing.
This commit is contained in:
@ -51,6 +51,7 @@ def simple_form(instancetype, itemid, request, formclass, formtemplate='base/for
|
||||
'markdownfields': markdownfields,
|
||||
'form_intro': hasattr(form, 'form_intro') and form.form_intro or None,
|
||||
'savebutton': (itemid == "new") and "New" or "Save",
|
||||
'operation': (itemid == "new") and "New" or "Edit",
|
||||
}, NavContext(request, navsection))
|
||||
|
||||
def template_to_string(templatename, attrs = {}):
|
||||
|
Reference in New Issue
Block a user