From ed0e1f2bb125bd109ff7ae4aa2e998c7d5a90446 Mon Sep 17 00:00:00 2001 From: Edward Ribeiro Date: Wed, 11 Jul 2018 13:52:10 -0300 Subject: [PATCH] =?UTF-8?q?HOT-FIX:=20usu=C3=A1rio=20estourando=20limite?= =?UTF-8?q?=20de=20campo=20em=20User?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/base/forms.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sapl/base/forms.py b/sapl/base/forms.py index ea0f628a3..de6b50403 100644 --- a/sapl/base/forms.py +++ b/sapl/base/forms.py @@ -51,11 +51,14 @@ def get_roles(): class UsuarioCreateForm(ModelForm): - username = forms.CharField(required=True, label="Nome de usuário") - firstname = forms.CharField(required=True, label="Nome") - lastname = forms.CharField(required=True, label="Sobrenome") - password1 = forms.CharField(required=True, widget=forms.PasswordInput, label='Senha') - password2 = forms.CharField(required=True, widget=forms.PasswordInput, label='Confirmar senha') + username = forms.CharField(required=True, label="Nome de usuário", + max_length=30) + firstname = forms.CharField(required=True, label="Nome", max_length=30) + lastname = forms.CharField(required=True, label="Sobrenome", max_length=30) + password1 = forms.CharField(required=True, widget=forms.PasswordInput, + label='Senha', max_length=128) + password2 = forms.CharField(required=True, widget=forms.PasswordInput, + label='Confirmar senha', max_length=128) user_active = forms.ChoiceField(required=False, choices=YES_NO_CHOICES, label="Usuário ativo?", initial='True')