예제 #1
0
class PasswordChangeCustomForm(PasswordChangeForm):
    error_css_class = 'has-error'
    error_messages = {'password_incorrect': "Неверный старый пароль. Повторите попытку."}
    old_password = CharField(required=True, label='Текущий пароль',
                             widget=PasswordInput(attrs={
                                 'class': 'form-control'}),
                             error_messages={
                                 'required': 'Пароль не может быть пустым'})

    new_password1 = CharField(required=True, label='Новый пароль',
                              widget=PasswordInput(attrs={
                                  'class': 'form-control'}),
                              error_messages={
                                  'required': 'Пароль не может быть пустым'})

    new_password2 = CharField(required=True, label='Новый пароль (подтверждение)',
                              widget=PasswordInput(attrs={
                                  'class': 'form-control'}),
                              error_messages={
                                  'required': 'Пароль не может быть пустым'})
예제 #2
0
class LoginForm(forms.Form):
    username = forms.CharField(required=True,
                               widget=TextInput(attrs={
                                   'class': 'form-control',
                               }),
                               label='Login')
    password = forms.CharField(required=True,
                               widget=PasswordInput(attrs={
                                   'class': 'form-control',
                               }),
                               label='Password')
예제 #3
0
class LoginForm(Form):
    username = CharField(label="", widget=TextInput(attrs={
        'required': 'true',
        'placeholder': "Username",
        "class": "form-control"
    }), required=True)
    password = CharField(label="", widget=PasswordInput(attrs={
        'required': 'true',
        'placeholder': "Password",
        "class": "form-control"
    }), required=True)
예제 #4
0
class LoginForm(Form):
    username=CharField(
        max_length=20,
        required=True,
        widget=TextInput(attrs={'class': 'form-control', 'placeholder': 'Username', 'required': 'true'})
    )
    password=CharField(
        max_length=20,
        required=True,
        widget=PasswordInput(attrs={'class': 'form-control', 'placeholder': 'Password', 'required': 'true'})
    )
예제 #5
0
 class Meta:
     model = administradores
     fields = ['usuario', 'clave']
     widgets = {
         'usuario': TextInput(attrs={'class': 'form-control'}),
         'clave': PasswordInput(attrs={'class': 'form-control'}),
     }
     labels = {
         'usuario': 'Usuario',
         'clave': 'Clave',
     }
예제 #6
0
class CustomLoginForm(AuthenticationForm):
    username = forms.CharField(widget=TextInput(
        attrs={
            'class': 'validate form-control',
            'placeholder': 'Username'
        }))
    password = forms.CharField(widget=PasswordInput(
        attrs={
            'class': 'form-control',
            'placeholder': 'Password'
        }))
예제 #7
0
 def __init__(self, *args, **kwargs):
     super(SignUpForm, self).__init__(*args, **kwargs)
     self.fields['username'].widget = TextInput(attrs={
         'placeholder': 'Username',
         'id': 'register_username'
     })
     self.fields['email'].widget = TextInput(attrs={
         'placeholder': 'E-mail',
         'id': 'register_email'
     })
     self.fields['password1'].widget = PasswordInput(
         attrs={
             'placeholder': 'Password',
             'id': 'register_password1'
         })
     self.fields['password2'].widget = PasswordInput(
         attrs={
             'placeholder': 'Confirm Password',
             'id': 'register_password2'
         })
예제 #8
0
class CustomUserCreationForm(UserCreationForm):
    class Meta(UserCreationForm.Meta):
        pass

    username = UsernameField(widget=TextInput(
        attrs={"class": "form-control"})),
    password1 = CharField(
        label="Password",
        strip=False,
        widget=PasswordInput(attrs={
            'autocomplete': 'new-password',
            "class": "form-control"
        }))
    password2 = CharField(
        label="Password confirmation",
        widget=PasswordInput(attrs={
            'autocomplete': 'new-password',
            "class": "form-control"
        }),
        strip=False)
예제 #9
0
파일: forms.py 프로젝트: zigellsn/StagyBee
 class Meta:
     model = Credential
     fields = [
         'congregation', 'autologin', 'username', 'password',
         'display_name', 'extractor_url', 'touch',
         'show_only_request_to_speak', 'send_times_to_stage', 'sort_order',
         'name_order'
     ]
     widgets = {
         'password': PasswordInput(render_value=True),
     }
예제 #10
0
파일: forms.py 프로젝트: vineethsai/blog
class RegistrationForm(forms.Form):
    """
    Registration form
    """
    username = forms.CharField(label='Username', max_length=30, required=True)
    password = forms.CharField(label='password',
                               max_length=30,
                               required=True,
                               widget=PasswordInput())
    passwordconf = forms.CharField(label='passwordconf',
                                   max_length=30,
                                   required=True,
                                   widget=PasswordInput())
    email = forms.CharField(label='email', max_length=30, required=True)
    first_name = forms.CharField(label='first_name',
                                 max_length=30,
                                 required=True)
    last_name = forms.CharField(label='last_name',
                                max_length=30,
                                required=True)
예제 #11
0
class CustomPasswordChangeForm(PasswordChangeForm):
    old_password = CharField(
        label=_("Old password"),
        strip=False,
        widget=PasswordInput(attrs={'autocomplete': 'current-password',
                                    'autofocus': True,
                                    'class': 'form-control rounded-0'}),
    )

    new_password1 = CharField(
        label=_("New password"),
        widget=PasswordInput(attrs={'autocomplete': 'new-password', 'class': 'form-control rounded-0'}),
        strip=False,
        help_text=password_validation.password_validators_help_text_html(),
    )
    new_password2 = CharField(
        label=_("New password confirmation"),
        strip=False,
        widget=PasswordInput(attrs={'autocomplete': 'new-password', 'class': 'form-control rounded-0'}),
    )
예제 #12
0
파일: forms.py 프로젝트: varunok/CRMRieltor
 class Meta:
     model = SettingSMS
     fields = (
         'sender',
         'login',
         'password',
     )
     widgets = {
         'password':
         PasswordInput(attrs={'class': 'col-md-12'}, render_value=True),
     }
예제 #13
0
class LoginForm(Form):

    username = CharField(widget=TextInput(attrs={
        'class': 'form-control',
        'placeholder': 'cuenta'
    }))

    password = CharField(widget=PasswordInput(attrs={
        'class': 'form-control',
        'placeholder': 'contraseña'
    }))
예제 #14
0
class ProfilePasswordForm(PasswordChangeForm):

    old_password = CharField(
        label='Contraseña Actual',
        widget=PasswordInput(attrs={
            'class': 'form-control input-xs',
            'autofocus': True
        }))

    new_password1 = CharField(
        label='Nueva contraseña',
        help_text=mark_safe(
            "<ul><li>La contraseña no puede ser similar a su otra información personal.</li><li>La contraseña debe contener al menos 8 caracteres.</li><li>La contraseña no puede ser una contraseña común.</li><li>La contraseña no puede ser enteramente numérica.</li></ul>"
        ),
        widget=PasswordInput(attrs={'class': 'form-control input-xs'}))
    new_password2 = CharField(
        label='Confirmar contraseña',
        help_text=
        "Para verificar, introduzca la misma contraseña que introdujo antes.",
        widget=PasswordInput(attrs={'class': 'form-control input-xs'}))
예제 #15
0
파일: forms.py 프로젝트: Silvester23/darts
class SignupForm(ModelForm):
    class Meta:
        model = Player
        fields = ['name']

    password1 = CharField(
        label='Passwort',
        widget=PasswordInput(),
    )

    password2 = CharField(
        label='Passwort wiederholen',
        widget=PasswordInput(),
    )

    def clean(self):
        cleaned_data = super().clean()
        if cleaned_data['password1'] != cleaned_data['password2']:
            raise ValidationError('Die Passwörter sind nicht identisch.')
        return self.cleaned_data
예제 #16
0
파일: forms.py 프로젝트: thestics/web_chat
class LoginForm(Form):
    username = CharField(
        label='Username',
        max_length=128,
        validators=[username_validator],
        widget=TextInput(attrs={'class': 'form-control w-25'}))

    password = CharField(
        label='Password',
        max_length=128,
        widget=PasswordInput(attrs={'class': 'form-control w-25'}))
예제 #17
0
    class Meta:
        model = User
        widgets = {
            'password': PasswordInput(),
        }

        labels = {
            'password': _('Type your password'),
            'email': _('Your E-mail')
        }
        fields = ['name', 'email', 'username', 'password', 'confirm_password']
예제 #18
0
class LoginForm(Form):
    # User name
    attrs = {'autofocus': 'autofocus', 'required': 'true'}
    username = CharField(widget=TextInput(attrs=attrs))

    attrs = {'required': 'true'}
    password = CharField(widget=PasswordInput(attrs=attrs))

    remember_me = BooleanField(required=False, initial=True)
    
    next_url = CharField(widget=HiddenInput())
예제 #19
0
 class Meta:
     model = User
     fields = ["username", "email", "password"]
     widget = {
         'username': TextInput(attrs={'class': 'form-control'}),
         'email': EmailInput(attrs={'class': 'form-control'}),
         'password': PasswordInput(attrs={'class': 'form-control'})
     }
     help_texts = {
         'username': None,
     }
예제 #20
0
    def __init__(self, *args, **kwargs):
        super(MyLoginForm, self).__init__(*args, **kwargs)

        self.fields['login'] = CharField(
            label=("E-MAIL"),
            widget=TextInput(attrs={
                'class': 'form-control',
            }))
        self.fields['password'].widget = PasswordInput(attrs={
            'class': 'form-control',
        })
예제 #21
0
 class Meta:
     model = CustomUser
     fields = ('username', 'email', 'first_name', 'last_name',
               'idcard', 'country', 'phone', 'currency', 'password1', 'password2')
     widgets = {'idcard': FileInput(attrs={'class': 'blackme'}), 'first_name': TextInput(attrs={'class': 'blackme', 'placeholder': 'Firstname'}), 'last_name': TextInput(
         attrs={'class': 'blackme', 'placeholder': 'Lastname'}), 'phone': TextInput(
         attrs={'class': 'blackme', 'placeholder': 'Phone Number'}), 'email': TextInput(
         attrs={'class': 'blackme', 'placeholder': 'Email'}),  'username': TextInput(
         attrs={'class': 'blackme', 'placeholder': 'Username'}), 'password1': PasswordInput(attrs={'id': 'blackme',
                                                                                                   'type': 'password',
                                                                                                   'required': 'true', }), }
예제 #22
0
 def __init__(self, *args, **kwargs):
     super(CreateUserForm, self).__init__(*args, **kwargs)
     self.fields['password1'].widget = PasswordInput(
         attrs={
             'class': 'form-control',
             'placeholder': 'Enter Password',
             'autocomplete': 'new-password'
         })
     self.fields['password2'].widget = PasswordInput(
         attrs={
             'class': 'form-control',
             'placeholder': 'Re-enter Password',
             'autocomplete': 'new-password'
         })
     self.fields['email'].widget.attrs.update({
         'placeholder': 'Enter Email',
         'autocomplete': 'off',
         'id': 'email',
         'type': 'email'
     })
예제 #23
0
파일: forms.py 프로젝트: sxf123/opsplt
class UserUpdatePassword(forms.Form):
    username = forms.CharField(
        widget=TextInput(attrs={
            'id': 'username',
            'class': 'form-control',
            'disabled': 'disabled'
        }),
        required=False)
    password = forms.CharField(widget=PasswordInput(
        attrs={
            'id': 'password',
            'class': 'form-control',
            'placeholder': '请输入新密码'
        }))
    confirm_password = forms.CharField(widget=PasswordInput(
        attrs={
            'id': 'confirm_password',
            'class': 'form-control',
            'placeholder': '请输入确认密码'
        }))
예제 #24
0
    class Meta:
        model = User
        fields = ['first_name', 'last_name', 'email', 'username', 'password']

        widgets = {
            'first_name': TextInput(attrs={"class": "form-control"}),
            'last_name': TextInput(attrs={"class": "form-control"}),
            'email': EmailInput(attrs={"class": "form-control"}),
            'username': TextInput(attrs={"class": "form-control"}),
            'password': PasswordInput(attrs={"class": "form-control"}),
        }
예제 #25
0
 class Meta:
     model = Handset
     fields = [
         'PhoneNo', 'Password', 'confirmPassword', 'MacAddress',
         'ManagerName', 'ManagerPhoneNo', 'Department', 'FinalApprover'
     ]
     labels = {
         'PhoneNo': 'Phone ID No.',
         'Password': '******',
         'confirmPassword': '******',
         'MacAddress': 'MAC Address',
         'ManagerName': 'Manager Name',
         'ManagerPhoneNo': 'Manager Phone No.',
         'Department': 'Department',
         'FinalApprover': 'Final Approver Key',
     }
     widgets = {
         'Password': PasswordInput(),
         'confirmPassword': PasswordInput(),
     }
예제 #26
0
 def __init__(self, *args, **kwargs):
     super(LoginForm, self).__init__(*args, **kwargs)
     #Se definen los widgets para ambas columnas
     self.fields['password'].widget = PasswordInput(attrs={
         'placeholder': 'Ingrese contraseña',
         'class': 'form-control'
     })
     self.fields['username'].widget = TextInput(attrs={
         'placeholder': 'Ingrese Username',
         'class': 'form-control'
     })
예제 #27
0
    class Meta:
        model = User
        fields = ["first_name", "last_name", "email", "username", "password"]

        widgets = {
            "first_name": TextInput(attrs={"class": "form-control"}),
            "last_name": TextInput(attrs={"class": "form-control"}),
            "email": EmailInput(attrs={"class": "form-control"}),
            "username": TextInput(attrs={"class": "form-control"}),
            "password": PasswordInput(attrs={"class": "form-control"}),
        }
예제 #28
0
 class Meta: 
      model =  User
      fields = (
      	'username', 
      	'first_name', 
      	'last_name',
      	'email',
      	'password')
      widgets = {
         'password': PasswordInput()
     	} 
예제 #29
0
class LoginForm(AuthenticationForm):
    username = forms.CharField(widget=TextInput(
        attrs={
            'class': 'form-control',
            'placeholder': 'Enter username'
        }))
    password = forms.CharField(widget=PasswordInput(
        attrs={
            'class': 'form-control',
            'placeholder': 'Enter password'
        }))
예제 #30
0
class AccountPasswordChangeForm(PasswordChangeForm):
    old_password = CharField(
        label=_('Old password'),
        strip=False,
        widget=PasswordInput(attrs={
            'autofocus': True,
            'class': 'form-control'
        }),
    )
    new_password1 = CharField(
        label=_('New Password'),
        strip=False,
        widget=PasswordInput(attrs={'class': 'form-control'}),
        help_text=password_validation.password_validators_help_text_html(),
    )
    new_password2 = CharField(
        label=_('New Password Confirmation'),
        strip=False,
        widget=PasswordInput(attrs={'class': 'form-control'}),
    )