Tweak CRUD form buttons a little.

Change submit button wording for edit forms, from "Update" to "Save".  Also
show Cancel as a link instead of button.
This commit is contained in:
Lance Edgar 2014-11-23 14:25:13 -06:00
parent 8bf292ebac
commit 86507cf660
2 changed files with 6 additions and 6 deletions

View file

@ -1,9 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
################################################################################
#
# Rattail -- Retail Software Framework
# Copyright © 2010-2012 Lance Edgar
# Copyright © 2010-2014 Lance Edgar
#
# This file is part of Rattail.
#
@ -21,11 +20,12 @@
# along with Rattail. If not, see <http://www.gnu.org/licenses/>.
#
################################################################################
"""
FormAlchemy Forms
"""
from __future__ import unicode_literals
from rattail.core import Object
from pyramid.renderers import render
from ..db import Session
@ -40,7 +40,7 @@ class AlchemyForm(Object):
"""
create_label = "Create"
update_label = "Update"
update_label = "Save"
allow_successive_creates = False

View file

@ -9,7 +9,7 @@
% if form.creating and form.allow_successive_creates:
${h.submit('create_and_continue', form.successive_create_label)}
% endif
<button type="button" onclick="location.href = '${form.cancel_url}';">Cancel</button>
<a href="${form.cancel_url}">Cancel</a>
</div>
${h.end_form()}