summaryrefslogtreecommitdiff
path: root/pgweb/util/helpers.py
diff options
context:
space:
mode:
authorMagnus Hagander2010-02-27 01:06:15 +0000
committerMagnus Hagander2010-02-27 01:06:15 +0000
commit587bda6b9fe35155b3052b4b9ab6645c2dff2271 (patch)
treec425663f32922c01dc4f8015f3fbbf65f6e1c99a /pgweb/util/helpers.py
parent0e57a048dd0814ed5ce9e9d523fc33372f9d593a (diff)
Make the base form support different names for the save button
Diffstat (limited to 'pgweb/util/helpers.py')
-rw-r--r--pgweb/util/helpers.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/pgweb/util/helpers.py b/pgweb/util/helpers.py
index b9dd0405..c3183c43 100644
--- a/pgweb/util/helpers.py
+++ b/pgweb/util/helpers.py
@@ -50,6 +50,7 @@ def simple_form(instancetype, itemid, request, formclass, formtemplate='base/for
'formitemtype': instance._meta.verbose_name,
'markdownfields': markdownfields,
'form_intro': hasattr(form, 'form_intro') and form.form_intro or None,
+ 'savebutton': (itemid == "new") and "New" or "Save",
}, NavContext(request, navsection))
def template_to_string(templatename, attrs = {}):