a
    npdW                     @   sx   d dl mZ d dlmZ d dlmZ ddlT d dlmZ G dd deZ	g d	Z
G d
d dejZG dd dejZdS )    )UserCreationForm)User)forms   )*)Fc                       s   e Zd ZejdejdddddZejddejddddd	Zejddejdd
ddd	Z	G dd dZ
 fddZ  ZS )
SignUpForm form-controlzEmail Address)classplaceholderattrs)labelwidgetd   
First Name)r   
max_lengthr   	Last Namec                   @   s   e Zd ZeZdZdS )zSignUpForm.Meta)username
first_name	last_nameemail	password1	password2N)__name__
__module____qualname__r   modelfields r    r    @/Users/Home/Documents/Nicolas/Dev/CFYOU/tonal/tonal_app/forms.pyMeta   s   r"   c                    s   t t| j|i | d| jd jjd< d| jd jjd< d| jd _d| jd _d| jd jjd< d	| jd jjd< d| jd _d
| jd _d| jd jjd< d| jd jjd< d| jd _d| jd _d S )Nr
   r   r   z	User Namer   r	   z<span class="form-text text-muted"><small>Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.</small></span>r   Passworda  <ul class="form-text text-muted small"><li>Your password can't be too similar to your other personal information.</li><li>Your password must contain at least 8 characters.</li><li>Your password can't be a commonly used password.</li><li>Your password can't be entirely numeric.</li></ul>r   zConfirm Passwordzm<span class="form-text text-muted"><small>Enter the same password as before, for verification.</small></span>)superr   __init__r   r   r   r   	help_text)selfargskwargs	__class__r    r!   r%      s    zSignUpForm.__init__)r   r   r   r   
EmailField	TextInputr   	CharFieldr   r   r"   r%   __classcell__r    r    r*   r!   r      s
   r   ))Orangesr0   )Cantaloupesr1   )Mangoesr2   )	Honeydewsr3   c                       sz  e Zd Z fddZejdejjddddddZejdejjd	dddd
dZ	ejdejjddddd
dZ
ejdejjddddd
dZejdejjddddd
dZejdejjddddd
dZejdejjddddd
dZejdejjddddd
dZejdejjddddddZejdejjedddZejdej ddZG dd dZ  ZS )AddRecordFormc                    sZ   | d| _tt| j|i | tjj| jdjddd}dd |D }|| j	d _
d S )	Npk)refr   T)flatc                 S   s   g | ]}||fqS r    r    ).0varr    r    r!   
<listcomp>1       z*AddRecordForm.__init__.<locals>.<listcomp>	testrever)popZ
storage_pkr$   r4   r%   TDCobjectsfiltervalues_listr   choices)r'   r(   r)   querysetrB   r*   r    r!   r%   -   s
    zAddRecordForm.__init__TIDr
   r   r   r   requiredr   r   r   r	   r   EmailZPhoneAddressZCityFStateZZipcode)rB   regarder<   c                   @   s"   e Zd ZeZdZdZdejiZ	dS )zAddRecordForm.Metauser__all__r<   N)
r   r   r   Recordr   excluder   r   SelectMultiplewidgetsr    r    r    r!   r"   H   s   r"   )r   r   r   r%   r   r.   rR   r-   idr   r   r   phoneaddresscitystatezipcodeSelectFRUIT_CHOICESrK   MultipleChoiceFieldCheckboxSelectMultipler<   r"   r/   r    r    r*   r!   r4   +   s            r4   c                   @   sZ   e Zd ZejdejjddddddZejdejjddddddZG d	d
 d
Z	dS )BDCformFr   r
   rE   r   r	   rF   r   c                   @   s   e Zd ZeZdZdS )zBDCform.MetarL   N)r   r   r   r>   r   rP   r    r    r    r!   r"   U   s   r"   N)
r   r   r   r   r.   rR   r-   r6   r   r"   r    r    r    r!   r]   Q   s     r]   N)django.contrib.auth.formsr   django.contrib.auth.modelsr   djangor   modelsdjango.db.modelsr   r   rZ   	ModelFormr4   r]   r    r    r    r!   <module>   s   &