summaryrefslogtreecommitdiffstats
path: root/ipa-server/ipa-gui/ipagui/subcontrollers/group.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/group.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/group.py')
-rw-r--r--ipa-server/ipa-gui/ipagui/subcontrollers/group.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/ipa-server/ipa-gui/ipagui/subcontrollers/group.py b/ipa-server/ipa-gui/ipagui/subcontrollers/group.py
index b776c810..4c6204c3 100644
--- a/ipa-server/ipa-gui/ipagui/subcontrollers/group.py
+++ b/ipa-server/ipa-gui/ipagui/subcontrollers/group.py
@@ -41,7 +41,8 @@ class GroupController(IPAController):
def new(self, tg_errors=None):
"""Displays the new group 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()
@@ -60,6 +61,8 @@ class GroupController(IPAController):
tg_errors, kw = self.groupcreatevalidate(**kw)
if tg_errors:
+ turbogears.flash("There were validation errors.<br/>" +
+ "Please see the messages below for details.")
return dict(form=group_new_form, group=kw,
tg_template='ipagui.templates.groupnew')
@@ -167,7 +170,8 @@ class GroupController(IPAController):
def edit(self, cn, tg_errors=None):
"""Displays the edit group 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()
@@ -227,6 +231,8 @@ class GroupController(IPAController):
tg_errors, kw = self.groupupdatevalidate(**kw)
if tg_errors:
+ turbogears.flash("There were validation errors.<br/>" +
+ "Please see the messages below for details.")
return dict(form=group_edit_form, group=kw, members=member_dicts,
tg_template='ipagui.templates.groupedit')