|
@ -57,7 +57,10 @@ class UsuarioForm(ModelForm): |
|
|
widget=forms.Select(), |
|
|
widget=forms.Select(), |
|
|
choices=TIPO_TELEFONE, |
|
|
choices=TIPO_TELEFONE, |
|
|
label=_(u'Tipo Telefone')) |
|
|
label=_(u'Tipo Telefone')) |
|
|
segundo_ddd = forms.CharField(required=False, max_length=2, label=_(u'DDD')) |
|
|
segundo_ddd = forms.CharField( |
|
|
|
|
|
required=False, |
|
|
|
|
|
max_length=2, |
|
|
|
|
|
label=_(u'DDD')) |
|
|
segundo_numero = forms.CharField( |
|
|
segundo_numero = forms.CharField( |
|
|
required=False, max_length=10, label=_(u'Número')) |
|
|
required=False, max_length=10, label=_(u'Número')) |
|
|
segundo_principal = forms.ChoiceField( |
|
|
segundo_principal = forms.ChoiceField( |
|
@ -86,12 +89,12 @@ class UsuarioForm(ModelForm): |
|
|
|
|
|
|
|
|
class Meta(object): |
|
|
class Meta(object): |
|
|
model = Usuario |
|
|
model = Usuario |
|
|
fields = [u'username', u'email', u'nome_completo', u'password', u'vinculo', |
|
|
fields = [u'username', u'email', u'nome_completo', u'password', |
|
|
u'password_confirm', u'email_confirm', u'captcha', u'cpf', u'rg', |
|
|
u'vinculo', u'password_confirm', u'email_confirm', |
|
|
u'cargo', u'casa_legislativa'] |
|
|
u'captcha', u'cpf', u'rg', u'cargo', u'casa_legislativa'] |
|
|
|
|
|
|
|
|
widgets = {u'email': forms.TextInput( |
|
|
widgets = {u'email': forms.TextInput( |
|
|
attrs={u'style': u'text-transform:lowercase;'}),} |
|
|
attrs={u'style': u'text-transform:lowercase;'}), } |
|
|
|
|
|
|
|
|
def __init__(self, *args, **kwargs): |
|
|
def __init__(self, *args, **kwargs): |
|
|
super(UsuarioForm, self).__init__(*args, **kwargs) |
|
|
super(UsuarioForm, self).__init__(*args, **kwargs) |
|
@ -210,9 +213,11 @@ class UsuarioEditForm(UsuarioForm): |
|
|
fields = [u'username', u'email', u'nome_completo', u'vinculo', |
|
|
fields = [u'username', u'email', u'nome_completo', u'vinculo', |
|
|
u'email_confirm', u'captcha', u'cpf', u'rg', |
|
|
u'email_confirm', u'captcha', u'cpf', u'rg', |
|
|
u'cargo', u'casa_legislativa'] |
|
|
u'cargo', u'casa_legislativa'] |
|
|
widgets = {u'username': forms.TextInput(attrs={u'readonly': u'readonly'}), |
|
|
widgets = {u'username': forms.TextInput( |
|
|
|
|
|
attrs={u'readonly': u'readonly'}), |
|
|
u'email': forms.TextInput( |
|
|
u'email': forms.TextInput( |
|
|
attrs={u'style': u'text-transform:lowercase;'}), |
|
|
attrs={u'style': u'text-transform:lowercase;'} |
|
|
|
|
|
), |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
def __init__(self, *args, **kwargs): |
|
|
def __init__(self, *args, **kwargs): |
|
@ -307,7 +312,8 @@ class HabilitarEditForm(ModelForm): |
|
|
fields = [u'cpf', u'nome_completo', u'email', u'habilitado'] |
|
|
fields = [u'cpf', u'nome_completo', u'email', u'habilitado'] |
|
|
widgets = { |
|
|
widgets = { |
|
|
u'cpf': forms.TextInput(attrs={u'readonly': u'readonly'}), |
|
|
u'cpf': forms.TextInput(attrs={u'readonly': u'readonly'}), |
|
|
u'nome_completo': forms.TextInput(attrs={u'readonly': u'readonly'}), |
|
|
u'nome_completo': forms.TextInput(attrs={u'readonly': u'readonly'} |
|
|
|
|
|
), |
|
|
u'email': forms.TextInput(attrs={u'readonly': u'readonly'}) |
|
|
u'email': forms.TextInput(attrs={u'readonly': u'readonly'}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|