Parcourir la source

[enh] Add comment

ljf il y a 6 ans
Parent
commit
49c560d293
1 fichiers modifiés avec 3 ajouts et 2 suppressions
  1. 3 2
      coin/members/forms.py

+ 3 - 2
coin/members/forms.py

@@ -15,7 +15,7 @@ class MemberRegistrationForm(RegistrationForm):
     # Protect against robot
     # Protect against robot
     trap = forms.CharField(required=False, label='Trap',
     trap = forms.CharField(required=False, label='Trap',
             widget=forms.TextInput(attrs={'style' : 'display:none'}),
             widget=forms.TextInput(attrs={'style' : 'display:none'}),
-        help_text="Si vous êtes humain ne ignorez ce champ")
+        help_text="Si vous êtes humain ignorez ce champ")
 
 
     def __init__(self, *args, **kwargs):
     def __init__(self, *args, **kwargs):
         super(MemberRegistrationForm, self).__init__(*args, **kwargs)
         super(MemberRegistrationForm, self).__init__(*args, **kwargs)
@@ -33,7 +33,8 @@ class MemberRegistrationForm(RegistrationForm):
 
 
     def as_p(self):
     def as_p(self):
         """"
         """"
-        Hide captcha
+        We rewrite the as_p method to apply a style on the <p> tag related to
+        trap field. Indeed, it seeems there is no cleaner way to do it.
         """
         """
         def css_classes(self, extra_classes=None):
         def css_classes(self, extra_classes=None):
             return 'captcha'
             return 'captcha'