From fd8690dd63a812361401b341f8cbf857b1b98464 Mon Sep 17 00:00:00 2001 From: Kevin McCarthy Date: Fri, 19 Oct 2007 08:59:40 -0700 Subject: Add a flash message to the top of the page when there are validation errors. --- ipa-server/ipa-gui/ipagui/subcontrollers/user.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'ipa-server/ipa-gui/ipagui/subcontrollers/user.py') diff --git a/ipa-server/ipa-gui/ipagui/subcontrollers/user.py b/ipa-server/ipa-gui/ipagui/subcontrollers/user.py index 2f7f4722..5552bee7 100644 --- a/ipa-server/ipa-gui/ipagui/subcontrollers/user.py +++ b/ipa-server/ipa-gui/ipagui/subcontrollers/user.py @@ -38,7 +38,8 @@ class UserController(IPAController): def new(self, tg_errors=None): """Displays the new user form""" if tg_errors: - turbogears.flash("There was a problem with the form!") + turbogears.flash("There were validation errors.
" + + "Please see the messages below for details.") return dict(form=user_new_form, user={}) @@ -55,6 +56,8 @@ class UserController(IPAController): tg_errors, kw = self.usercreatevalidate(**kw) if tg_errors: + turbogears.flash("There were validation errors.
" + + "Please see the messages below for details.") return dict(form=user_new_form, user=kw, tg_template='ipagui.templates.usernew') @@ -193,7 +196,8 @@ class UserController(IPAController): def edit(self, uid, tg_errors=None): """Displays the edit user form""" if tg_errors: - turbogears.flash("There was a problem with the form!") + turbogears.flash("There were validation errors.
" + + "Please see the messages below for details.") client = self.get_ipaclient() @@ -236,6 +240,8 @@ class UserController(IPAController): tg_errors, kw = self.userupdatevalidate(**kw) if tg_errors: + turbogears.flash("There were validation errors.
" + + "Please see the messages below for details.") return dict(form=user_edit_form, user=kw, user_groups=user_groups_dicts, tg_template='ipagui.templates.useredit') -- cgit