from django import forms
from django.contrib.auth.forms import SetPasswordForm

from siscoban.agent.forms.agent import USER_FIELDS, AgentForm
from ..models import User


class UserForm(AgentForm):
    class Meta:
        model = User
        fields = USER_FIELDS + ('username', 'picture', 'groups')


class SetUserPasswordForm(SetPasswordForm):
    new_password1 = forms.CharField(widget=forms.PasswordInput(), label="Senha")
    new_password2 = forms.CharField(widget=forms.PasswordInput(), label="Confirmação de senha")
    send_mail = forms.BooleanField(label="Enviar e-mail", required=False)

    def __init__(self, *args, **kwargs):
        user = kwargs.pop("user")
        super(SetUserPasswordForm, self).__init__(user, *args, **kwargs)

    class Meta:
        fields = ('new_password1', 'new_password2', 'send_mail')

897362f5649e3f66a10eaeac5d3b932ec19d2263
<mask token>


class SetUserPasswordForm(SetPasswordForm):
    <mask token>
    <mask token>
    <mask token>

    def __init__(self, *args, **kwargs):
        user = kwargs.pop('user')
        super(SetUserPasswordForm, self).__init__(user, *args, **kwargs)


    class Meta:
        fields = 'new_password1', 'new_password2', 'send_mail'

<mask token>


class SetUserPasswordForm(SetPasswordForm):
    new_password1 = forms.CharField(widget=forms.PasswordInput(), label='Senha'
        )
    new_password2 = forms.CharField(widget=forms.PasswordInput(), label=
        'Confirmação de senha')
    send_mail = forms.BooleanField(label='Enviar e-mail', required=False)

    def __init__(self, *args, **kwargs):
        user = kwargs.pop('user')
        super(SetUserPasswordForm, self).__init__(user, *args, **kwargs)


    class Meta:
        fields = 'new_password1', 'new_password2', 'send_mail'

<mask token>


class UserForm(AgentForm):


    class Meta:
        model = User
        fields = USER_FIELDS + ('username', 'picture', 'groups')


class SetUserPasswordForm(SetPasswordForm):
    new_password1 = forms.CharField(widget=forms.PasswordInput(), label='Senha'
        )
    new_password2 = forms.CharField(widget=forms.PasswordInput(), label=
        'Confirmação de senha')
    send_mail = forms.BooleanField(label='Enviar e-mail', required=False)

    def __init__(self, *args, **kwargs):
        user = kwargs.pop('user')
        super(SetUserPasswordForm, self).__init__(user, *args, **kwargs)


    class Meta:
        fields = 'new_password1', 'new_password2', 'send_mail'

from django import forms
from django.contrib.auth.forms import SetPasswordForm
from siscoban.agent.forms.agent import USER_FIELDS, AgentForm
from ..models import User


class UserForm(AgentForm):


    class Meta:
        model = User
        fields = USER_FIELDS + ('username', 'picture', 'groups')


class SetUserPasswordForm(SetPasswordForm):
    new_password1 = forms.CharField(widget=forms.PasswordInput(), label='Senha'
        )
    new_password2 = forms.CharField(widget=forms.PasswordInput(), label=
        'Confirmação de senha')
    send_mail = forms.BooleanField(label='Enviar e-mail', required=False)

    def __init__(self, *args, **kwargs):
        user = kwargs.pop('user')
        super(SetUserPasswordForm, self).__init__(user, *args, **kwargs)


    class Meta:
        fields = 'new_password1', 'new_password2', 'send_mail'

from django import forms
from django.contrib.auth.forms import SetPasswordForm

from siscoban.agent.forms.agent import USER_FIELDS, AgentForm
from ..models import User


class UserForm(AgentForm):
    class Meta:
        model = User
        fields = USER_FIELDS + ('username', 'picture', 'groups')


class SetUserPasswordForm(SetPasswordForm):
    new_password1 = forms.CharField(widget=forms.PasswordInput(), label="Senha")
    new_password2 = forms.CharField(widget=forms.PasswordInput(), label="Confirmação de senha")
    send_mail = forms.BooleanField(label="Enviar e-mail", required=False)

    def __init__(self, *args, **kwargs):
        user = kwargs.pop("user")
        super(SetUserPasswordForm, self).__init__(user, *args, **kwargs)

    class Meta:
        fields = ('new_password1', 'new_password2', 'send_mail')
