Commits

Sergey Maranchuk committed 0138ff8

close #48: Add label='OpenID URL' to OpenidSigninForm

Comments (0)

Files changed (1)

django_authopenid/forms.py

     
 from django_authopenid.models import UserAssociation
 
-    
+
 class OpenidSigninForm(forms.Form):
     """ signin form """
     openid_url = forms.CharField(max_length=255, 
-            widget=forms.widgets.TextInput(attrs={'class': 'required openid'}))
-            
+            widget=forms.widgets.TextInput(attrs={'class': 'required openid'}),
+            label=_("OpenID URL"))
+    
     def clean_openid_url(self):
         """ test if openid is accepted """
         if 'openid_url' in self.cleaned_data:
     username = forms.CharField(max_length=30, 
             widget=forms.widgets.TextInput(attrs=attrs_dict))
     email = forms.EmailField(widget=forms.TextInput(attrs=dict(attrs_dict, 
-        maxlength=200)), label=u'Email address')
-        
+        maxlength=200)), label=_('Email address'))
+    
     def __init__(self, *args, **kwargs):
         super(OpenidRegisterForm, self).__init__(*args, **kwargs)
         self.user = None
                     another.')
             raise forms.ValidationError(_("This email is already \
                 registered in our database. Please choose another."))
-                
-                
+
 class AssociateOpenID(forms.Form):
     """ new openid association form """
     openid_url = forms.CharField(max_length=255, 
-            widget=forms.widgets.TextInput(attrs={'class': 'required openid'}))
+            widget=forms.widgets.TextInput(attrs={'class': 'required openid'}),
+            label=_("OpenID URL"))
 
     def __init__(self, user, *args, **kwargs):
         super(AssociateOpenID, self).__init__(*args, **kwargs)
                     registered in our database by another account. Please choose another."))
                     
             raise forms.ValidationError(_("You already associated this openid to your account."))
-            
+
 class OpenidDissociateForm(OpenidSigninForm):
     """ form used to dissociate an openid. """
-    openid_url = forms.CharField(max_length=255, widget=forms.widgets.HiddenInput())
+    openid_url = forms.CharField(max_length=255, widget=forms.widgets.HiddenInput())
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.