
    siC                     |    d Z 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 ddlmZ  G d d	e      Z G d
 de      Zy)a{  
Forms for handling payroll-related operations.

This module provides Django ModelForms for creating and managing payroll-related data,
including filing status, tax brackets, and federal tax records.

The forms in this module inherit from the Django `forms.ModelForm` class and customize
the widget attributes to enhance the user interface and provide a better user experience.

    )forms)gettext_lazy)	ModelForm)federal_tax)FilingStatus)
TaxBracketc                   B     e Zd ZdZddddZ G d d      Z fdZ xZS )FilingStatusFormz-Form for creating and updating filing status.   )filing_statusbased_ondescriptionc                       e Zd ZdZeZdZdgZy)FilingStatusForm.MetaMeta options for the form.__all__	is_activeN)__name__
__module____qualname____doc__r   modelfieldsexclude     ;/var/www/python-projects/worksol/payroll/forms/tax_forms.pyMetar      s    (-r   r   c                 <   t        |   |i | | j                  d   j                  j                  }d| j                  d   _        d|d<   | j                  j                   t        j                  | j                  _
        y | j                  d= | j                  d= y )Nuse_pyFpython_codea<  
        if($(this).is(':checked')){
            $('#oc-editor').show();
            //$("#objectCreateModal #objectCreateModalTarget").css("max-width","90%")
        }else{
            //$("#objectCreateModal #objectCreateModalTarget").css("max-width","650px")
            $('#oc-editor').hide();
        }
        onchange)super__init__r   widgetattrsrequiredinstancepkr   CODEr!   )selfargskwargsr&   	__class__s       r   r$   zFilingStatusForm.__init__%   s    $)&)kk(+2288.3M"+ 		
 ==#(3(8(8DMM%H%M*r   )r   r   r   r   colsr   r$   __classcell__)r.   s   @r   r
   r
      s,    7 D   + +r   r
   c                   0    e Zd ZdZddddZ G d d      Zy)TaxBracketFormz+Form for creating and updating tax bracket.r   )
min_income
max_incometax_ratec                   D    e Zd ZdZeZdZdgZd ej                         iZ
y)TaxBracketForm.Metar   r   r   filing_status_idN)r   r   r   r   r   r   r   r   r   HiddenInputwidgetsr   r   r   r   r7   A   s.    (- 1 1 1 3
r   r   N)r   r   r   r   r/   r   r   r   r   r2   r2   <   s    5BB?D
 
r   r2   N)r   djangor   django.utils.translationr   _
base.formsr   payroll.methodsr   payroll.models.modelsr   payroll.models.tax_modelsr   r
   r2   r   r   r   <module>rB      s7   	  6   ' . 0$+y $+N
Y 
r   