summaryrefslogtreecommitdiffstats
path: root/ipa-server/ipa-gui/ipagui/subcontrollers/user.py
diff options
context:
space:
mode:
authorKevin McCarthy <kmccarth@redhat.com>2007-10-19 08:59:40 -0700
committerKevin McCarthy <kmccarth@redhat.com>2007-10-19 08:59:40 -0700
commitfd8690dd63a812361401b341f8cbf857b1b98464 (patch)
tree0c7f0a9d330edc5a71fb1462e6c7535bd9f02881 /ipa-server/ipa-gui/ipagui/subcontrollers/user.py
parent4427ff78f643836ef7faf379eaf376bd99da7085 (diff)
downloadfreeipa.git-fd8690dd63a812361401b341f8cbf857b1b98464.tar.gz
freeipa.git-fd8690dd63a812361401b341f8cbf857b1b98464.tar.xz
freeipa.git-fd8690dd63a812361401b341f8cbf857b1b98464.zip
Add a flash message to the top of the page when there are validation errors.
Diffstat (limited to 'ipa-server/ipa-gui/ipagui/subcontrollers/user.py')
-rw-r--r--ipa-server/ipa-gui/ipagui/subcontrollers/user.py10
1 files changed, 8 insertions, 2 deletions
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.<br/>" +
+ "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.<br/>" +
+ "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.<br/>" +
+ "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.<br/>" +
+ "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')