diff options
author | Rob Crittenden <rcrit@ipa.greyoak.com> | 2008-08-14 11:34:40 -0400 |
---|---|---|
committer | Rob Crittenden <rcrit@ipa.greyoak.com> | 2008-08-14 14:55:35 -0400 |
commit | a013fe5cc23a88520cdffc779d013b8e5407cf81 (patch) | |
tree | 6775b48083a860270ba22764d1a3ab28f5d0e3c8 | |
parent | cee4b2cc1e66cebca59667b4d7de51b2abb45b7e (diff) | |
download | freeipa-a013fe5cc23a88520cdffc779d013b8e5407cf81.tar.gz freeipa-a013fe5cc23a88520cdffc779d013b8e5407cf81.tar.xz freeipa-a013fe5cc23a88520cdffc779d013b8e5407cf81.zip |
Fix some copy/paste and other syntax errors from the validators commit.
450613, 457124
-rw-r--r-- | ipa-server/ipa-gui/ipagui/forms/group.py | 6 | ||||
-rw-r--r-- | ipa-server/ipa-gui/ipagui/helpers/validators.py | 3 |
2 files changed, 4 insertions, 5 deletions
diff --git a/ipa-server/ipa-gui/ipagui/forms/group.py b/ipa-server/ipa-gui/ipagui/forms/group.py index dc3ac0608..6cbf9262f 100644 --- a/ipa-server/ipa-gui/ipagui/forms/group.py +++ b/ipa-server/ipa-gui/ipagui/forms/group.py @@ -18,7 +18,7 @@ import turbogears from turbogears import validators, widgets from tg_expanding_form_widget.tg_expanding_form_widget import ExpandingForm -from ipagui.helpers import ipahelper +from ipagui.helpers import ipahelper,validators class GroupFields(object): cn = widgets.TextField(name="cn", label="Name") @@ -36,7 +36,7 @@ class GroupFields(object): dn_to_info_json = widgets.HiddenField(name="dn_to_info_json") class GroupNewValidator(validators.Schema): - cn = GoodName(not_empty=True) + cn = validators.GoodName(not_empty=True) description = validators.String(not_empty=False) @@ -59,7 +59,7 @@ class GroupNewForm(widgets.Form): class GroupEditValidator(validators.Schema): - cn = GoodName(not_empty=False) + cn = validators.GoodName(not_empty=False) gidnumber = validators.Int(not_empty=False) description = validators.String(not_empty=False) diff --git a/ipa-server/ipa-gui/ipagui/helpers/validators.py b/ipa-server/ipa-gui/ipagui/helpers/validators.py index 27272595b..8ed73b87c 100644 --- a/ipa-server/ipa-gui/ipagui/helpers/validators.py +++ b/ipa-server/ipa-gui/ipagui/helpers/validators.py @@ -88,6 +88,5 @@ class GoodName(Regex): regex = r"^[a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,30}[a-zA-Z0-9_.$-]?$" messages = { - 'invalid': _('Enter only letters, numbers, _ (underscore), - (dash) or -$'), + 'invalid': _('Enter only letters, numbers, _ (underscore), - (dash) or $'), } |