o
    )wQh3                     @   s  d dl mZ d dlmZmZmZmZ ddlT d dlm	Z	 d dlm
Z
 d dlmZ d dlmZ d d	lmZ G d
d deZG dd deZG dd dejZG dd dejZG dd de
ZG dd deZG dd dejZG dd dejZG dd deZG dd deZG dd dejZG d d! d!ejZG d"d# d#ejZG d$d% d%ejZ G d&d' d'ejZ!G d(d) d)ejZ"G d*d+ d+ejZ#G d,d- d-ejZ$G d.d/ d/ejZ%d0S )1    )forms)UserCreationFormUserChangeFormPasswordResetFormSetPasswordForm   )*)settings)PasswordChangeForm)password_validation)CKEditorWidget)Userc                   @   s2   e Zd ZejddZejddZG dd dZdS )RegisterFormT)requiredd   )
max_lengthc                   @   s   e Zd ZeZg dZdS )zRegisterForm.Meta)
first_name	last_nameemailcompany_name	password1	password2N)__name__
__module____qualname__r   modelfields r   r   #/var/www/html/humari/myapp/forms.pyMeta   s    r   N)	r   r   r   r   
EmailFieldr   	CharFieldr   r   r   r   r   r   r   
   s    r   c                   @   sf   e Zd ZejdejdddddZejdejdddddZejd	d
ddidZ	G dd dZ
dS )CustomUserCreationFormPasswordform-controlpasswordclassplaceholderattrslabelwidgetConfirm Password (again)zpassword againTzI agree to the terms of servicer   z'You must agree to the terms to register)r   r,   error_messagesc                   @   sJ   e Zd ZeZg dZddddZejdddd	ej	dd
dd	dZ
dS )zCustomUserCreationForm.Meta)r   organisationr   r   	agreementEmailr#   r.   )r   r   r   r$   r   r&   r)   r0   )r   r0   N)r   r   r   User_Profiler   r   lablesr   
EmailInput	TextInputwidgetsr   r   r   r   r      s    
r   N)r   r   r   r   r!   PasswordInputr   r   BooleanFieldr1   r   r   r   r   r   r"      s    r"   c                   @   sn   e Zd ZejddejddiddZejddejddiddZejddejddiddZ	G d	d
 d
Z
dS )AddEmployeeFormr2   Tr'   r$   r)   r,   r   r-   z	Full NamePhonec                   @   s   e Zd ZeZg dZddiZejddddej	ddidej	ddidej	ddidej	ddidejddidej	ddidejdd	d
dej
ddddejddidej
dddddZdS )zAddEmployeeForm.Meta)r   	full_namephoneemployee_id
departmentmanagerteam_leaderhr	job_titleemployee_type
experiancedate_of_birthaddress	date_joinr   r2   r$   r   r'   r   r)   r'   zenter in years i.e. 2r&   dater'   type)r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   N)r   r   r   r3   r   r   r4   r   r6   Select	DateInputr7   r   r   r   r   r   (   s     
r   N)r   r   r   r   r!   r5   r   r6   r=   r>   r   r   r   r   r   r:   #   s
    r:   c                   @   sF   e Zd ZejddejdddddZejdejdd	ddd
ZdS )	LoginFormr2   Tr$   r   r&   r)   r;   r#   r%   r+   N)	r   r   r   r   r!   r5   r   r8   r%   r   r   r   r   rP   ;   s     rP   c                   @   sn   e Zd ZejddejddddddZejd	dejd
ddde dZ	ejddejd
ddddZ
dS )ChangePasswordFormzOld PasswordFzcurrent-passwordTr$   )autocomplete	autofocusr'   r)   r,   stripr-   New Passwordnew-passwordrR   r'   r,   rU   r-   	help_textConfirm New PasswordN)r   r   r   r   r!   r8   old_passwordr   "password_validators_help_text_htmlnew_password1new_password2r   r   r   r   rQ   @   s    

rQ   c                       s*   e Zd ZG dd dZ fddZ  ZS )CustomUserChangeFormc                   @   sl   e Zd ZeZg dZejddddejddddejddddejddddejddidd	Z	d
S )zCustomUserChangeForm.Meta)r   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   groupsr$   r   rJ   r)   rK   rL   r'   )r=   r>   rG   rI   rH   N)
r   r   r   r3   r   r   r   r6   rO   r7   r   r   r   r   r   K   s    
r   c                    s   t  j|i | | jD ]7}|dkr | j| jjddd n|dkr7d| j| _| j| jjddd | j| jjd	di qd S )
Nprofile_picr$   zpreviewImage(this);)r'   onchangera   Roler   rJ   r'   )super__init__r   r-   r*   updater,   )selfargskwargs
field_name	__class__r   r   rf   U   s   
zCustomUserChangeForm.__init__)r   r   r   r   rf   __classcell__r   r   rl   r   r`   I   s    
r`   c                   @   s4   e Zd ZejdejddiddZG dd dZdS )	BankCreationFormTr'   r$   r)   r   r-   c                   @   sn   e Zd ZeZg dZejddddejddddejddddejddddejdddddZ	dS )zBankCreationForm.Meta)employeenamebranchaccountsalarycountryr$   r   rJ   r)   )rq   rr   rs   rt   rv   N)
r   r   r   Bankr   r   r   rN   r6   r7   r   r   r   r   r   b   s    
r   N)r   r   r   r   DecimalFieldr6   ru   r   r   r   r   r   ro   `   s    ro   c                   @   s   e Zd ZejddejddiddZejddejddiddZejdejddidd	Zejd
ejddidd	Z	ejdejddidd	Z
ejddejddiddZejejddiddZejdejdddddZG dd dZdS )PayrollFormzBasic SalaryTr'   r$   r)   r;   zPresent DaysMedicalr+   PFConvencez
Total Days)r-   zenter in percent i.e. 3r&   rp   c                   @   sN   e Zd ZeZg dZejddddejddddejdddddZdS )zPayrollForm.Meta)rq   monthyearbasic_salary
total_dayspresent_daysmedicalpfbonusconvencetaxr$   r   rJ   r)   )rq   r}   r~   N)	r   r   r   Payrollr   r   r   rN   r7   r   r   r   r   r   v   s    
r   N)r   r   r   r   IntegerFieldr6   r   r   r   r   r   r   rx   r   r   r   r   r   r   r   ry   m   s    ry   c                   @   s,   e Zd ZejddejddddddZd	S )
MyPasswordResetFormr2      r   r$   zEnter your email)rR   r'   r(   r)   )r,   r   r-   N)r   r   r   r   r!   r5   r   r   r   r   r   r      s    
r   c                   @   sN   e Zd Zejddejdddde dZejddejddddd	Z	d
S )MySetPasswordResetFormrV   FrW   r$   rX   r)   rY   r[   rT   N)
r   r   r   r   r!   r8   r   r]   r^   r_   r   r   r   r   r      s    r   c                   @      e Zd ZG dd dZdS )ProjectFormc                   @   s@   e Zd ZeZddgZejddddejdddddd	Z	d
S )zProjectForm.Metaproject_name	employeesr   r$   )r   r'   r)   5)sizer   r'   )r   r   N)
r   r   r   Projectr   r   r   r6   SelectMultipler7   r   r   r   r   r      s    
r   Nr   r   r   r   r   r   r   r   r          r   c                   @   r   )InsuranceCreationFormc                   @   s,   e Zd ZeZdgZdejddddiZdS )zInsuranceCreationForm.Metaprovider_namer$   r   rJ   r)   N)	r   r   r   Health_Benefitr   r   r   r6   r7   r   r   r   r   r      s
    r   Nr   r   r   r   r   r          r   c                   @   r   )FeedbackFormc                   @   s2   e Zd ZeZdgZdhZdejddddiZ	dS )zFeedbackForm.Metafeedback_text r$   r   rJ   r)   N)
r   r   r   Feedbackr   r   labelsr   Textarear7   r   r   r   r   r      s    r   Nr   r   r   r   r   r      r   r   c                   @   r   )TrainingFormc                	   @   s|   e Zd ZeZg dZdddZejddddejddddej	ddddej
dd	dd
dejdddd
ddZdS )zTrainingForm.Meta)trainertitledescriptionrK   timezName of TrainerzTitle of Training & Session)r   r   r$   r   rJ   r)   rK   )r'   rM   r   r   N)r   r   r   Trainingr   r   r   r   r6   r   rO   	TimeInputr7   r   r   r   r   r      s    

r   Nr   r   r   r   r   r      r   r   c                   @   s   e Zd Zejg ddZdS )PlanSelectionForm))1-3 members for freer   )3-10 members $5/monthr   )10-50 members $15/monthr   )choicesN)r   r   r   r   ChoiceFieldselected_planr   r   r   r   r      s    r   c                   @   r   )privacy_policy_formc                   @   s    e Zd ZeZdgZde iZdS )zprivacy_policy_form.Metapolicy_textN)r   r   r   privacy_policyr   r   r   r7   r   r   r   r   r      s
    r   Nr   r   r   r   r   r      r   r   c                   @   r   )
VendorFormc                   @   s   e Zd ZeZg dZddddZejdddd	ej	d
did	ej
dddd	ejdddddd	ejdddd	ejd
did	ejd
did	ejd
did	ejdddd	d	ZdS )zVendorForm.Meta)	rr   vendor_logowebsiteservicesinternal_stakeholderscriticalitystatuscomplaint_withvendor_typezVendor NamezUpload Vendor LogozProduct or Service Description)rr   r   r   r$   r   rJ   r)   r'         )r'   r   rowscolsr   )r   r'   z"Input vendor type description herer&   N)r   r   r   Vendorr   r   r   r   r6   	FileInputURLInputr   r   rN   r7   r   r   r   r   r      s    
r   Nr   r   r   r   r   r      r   r   c                   @   r   )JobDescriptionFormc                   @   sF   e Zd ZeZddgZddiZejddddej	dddddZ
d	S )
zJobDescriptionForm.Metarq   r   zJob Description of Employeer$   r   rJ   r)   )rq   r   N)r   r   r   job_descriptionr   r   r   r   rN   r   r7   r   r   r   r   r      s    
r   Nr   r   r   r   r   r      r   r   c                   @   r   )UploadAgreementFormc                   @   sB   e Zd ZeZddgZi ZejddddejdddddZ	dS )	zUploadAgreementForm.Metaemployee_handbookconfidential_agreementr$   r   rJ   r)   )r   r   N)
r   r   r   company_agreementsr   r   r   r   r   r7   r   r   r   r   r      s    
r   Nr   r   r   r   r   r      r   r   N)&djangor   django.contrib.auth.formsr   r   r   r   modelsdjango.confr	   r
   django.contrib.authr   ckeditor.widgetsr   django.contrib.auth.modelsr   r   r"   	ModelFormr:   FormrP   rQ   r`   ro   ry   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   <module>   s6    			