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': 'Пароль не может быть пустым'})
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')
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)
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'}) )
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', }
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' }))
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' })
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)
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), }
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)
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'}), )
class Meta: model = SettingSMS fields = ( 'sender', 'login', 'password', ) widgets = { 'password': PasswordInput(attrs={'class': 'col-md-12'}, render_value=True), }
class LoginForm(Form): username = CharField(widget=TextInput(attrs={ 'class': 'form-control', 'placeholder': 'cuenta' })) password = CharField(widget=PasswordInput(attrs={ 'class': 'form-control', 'placeholder': 'contraseña' }))
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'}))
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
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'}))
class Meta: model = User widgets = { 'password': PasswordInput(), } labels = { 'password': _('Type your password'), 'email': _('Your E-mail') } fields = ['name', 'email', 'username', 'password', 'confirm_password']
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())
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, }
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', })
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', }), }
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' })
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': '请输入确认密码' }))
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"}), }
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(), }
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' })
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"}), }
class Meta: model = User fields = ( 'username', 'first_name', 'last_name', 'email', 'password') widgets = { 'password': PasswordInput() }
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' }))
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'}), )