ó
ã‘{Wc           @   s¼   d  d l  m Z d  d l m Z d  d l Td  d l Td e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d	 „  ƒ  YZ d
 e f d „  ƒ  YZ	 d e f d „  ƒ  YZ
 d e f d „  ƒ  YZ d S(   iÿÿÿÿ(   t	   ModelForm(   t   forms(   t   *t   ElectionFormc           B   s$   e  Z d  „  Z d d d „  ƒ  YZ RS(   c         O   s}   t  t |  ƒ j | | Ž  d |  j d _ d |  j d _ d |  j d _ d |  j d _ d |  j d	 _ d |  j d
 _ d  S(   Ns)   Leave blank to allow All Members to View.t   member_types_allowed_viewt    t   member_groups_allowed_views-   Leave blank to allow All Members to register.t   member_types_allowed_registert   member_groups_allowed_registers)   Leave blank to allow All Members to vote.t   member_types_allowed_votet   member_groups_allowed_vote(   t   superR   t   __init__t   fieldst	   help_text(   t   selft   argst   kwargs(    (    s5   /var/www/svtgbi.org/svtgbi/modules/elections/forms.pyR   	   s    t   Metac           B   s   e  Z e Z d Z RS(   t   slug(   s   slug(   t   __name__t
   __module__t   Electiont   modelt   exclude(    (    (    s5   /var/www/svtgbi.org/svtgbi/modules/elections/forms.pyR      s   (    (   R   R   R   R   (    (    (    s5   /var/www/svtgbi.org/svtgbi/modules/elections/forms.pyR      s   		t   ElectionPositionFormc           B   s$   e  Z d  „  Z d d d „  ƒ  YZ RS(   c         O   s]   t  t |  ƒ j | | Ž  d |  j d _ d |  j d _ d |  j d _ d |  j d _ d  S(   Ns-   Leave blank to allow non-members to register.R   R   R   s)   Leave blank to allow non-members to vote.R	   R
   (   R   R   R   R   R   (   R   R   R   (    (    s5   /var/www/svtgbi.org/svtgbi/modules/elections/forms.pyR      s
    R   c           B   s   e  Z e Z d Z RS(   t   election(   s   election(   R   R   t   ElectionPositionR   R   (    (    (    s5   /var/www/svtgbi.org/svtgbi/modules/elections/forms.pyR       s   (    (   R   R   R   R   (    (    (    s5   /var/www/svtgbi.org/svtgbi/modules/elections/forms.pyR      s   	t   AddElectionCandidateFormc           B   s$   e  Z d  „  Z d d d „  ƒ  YZ RS(   c         O   sH   t  t |  ƒ j | | Ž  t j j d t d d d d ƒ |  j d _ d  S(   Nt   approvedt   member_statust   currentt	   user_typet   member(	   R   R   R   t   Membert   objectst   filtert   TrueR   t   queryset(   R   R   R   (    (    s5   /var/www/svtgbi.org/svtgbi/modules/elections/forms.pyR   &   s    R   c           B   s   e  Z e Z d Z RS(   R!   t   positiont   qualificationst   current_postt   hospitalt   picturet	   manifesto(   s   members   positions   qualificationss   current_posts   hospitals   pictures	   manifesto(   R   R   t   ElectionCandidateR   R   (    (    (    s5   /var/www/svtgbi.org/svtgbi/modules/elections/forms.pyR   *   s   (    (   R   R   R   R   (    (    (    s5   /var/www/svtgbi.org/svtgbi/modules/elections/forms.pyR   $   s   	t   UpdateElectionCandidateFormc           B   s$   e  Z d  „  Z d d d „  ƒ  YZ RS(   c         O   sH   t  t |  ƒ j | | Ž  t j j d t d d d d ƒ |  j d _ d  S(   NR   R   R   R    R!   (	   R   R.   R   R"   R#   R$   R%   R   R&   (   R   R   R   (    (    s5   /var/www/svtgbi.org/svtgbi/modules/elections/forms.pyR   0   s    R   c           B   s   e  Z e Z d Z RS(   R!   t   titlet
   given_namet   surnamet   emailt	   telephoneR'   R(   R)   R*   R,   R+   (   s   members   titles
   given_names   surnames   emails	   telephones   positions   qualificationss   current_posts   hospitals	   manifestos   picture(   R   R   R-   R   R   (    (    (    s5   /var/www/svtgbi.org/svtgbi/modules/elections/forms.pyR   4   s   (    (   R   R   R   R   (    (    (    s5   /var/www/svtgbi.org/svtgbi/modules/elections/forms.pyR.   .   s   	t   ElectionRegistrationFormc           B   s$   e  Z d  „  Z d d d „  ƒ  YZ RS(   c         O   s|  | j  d ƒ } t t |  ƒ j | | Ž  g  } x' | D] } | j | j | j g ƒ q5 Wt |  j d _	 t |  j d _	 t |  j d _	 t |  j d _	 | |  j d _
 d |  j d _ d |  j d	 _ d
 |  j d	 _ d |  j d _ t |  j d _	 d |  j d _ d |  j d _ t |  j d _	 d |  j d _ t |  j d _	 d |  j d _ d |  j d _ t |  j d _	 d  S(   Nt   position_choicesR3   R(   R)   R*   R'   s   Position applying fors   R&eacute;sum&eacute;R,   se   Please enter a short manifesto (200 words) including your date of birth to acompany your application.s   Proposer Namet   sponsor_name_1s   Proposer Emailt   sponsor_email_1sR   Please enter the email address of a current Member who will propose your candidacys   Seconder Namet   sponsor_name_2s   Seconder Emailt   sponsor_email_2sQ   Please enter the email address of a current Member who will second your candidacy(   t   popR   R4   R   t   appendt   idt   nameR%   R   t   requiredt   choicest   labelR   (   R   R   R   R5   R?   t   position_choice(    (    s5   /var/www/svtgbi.org/svtgbi/modules/elections/forms.pyR   :   s.    R   c           B   s   e  Z e Z d Z RS(   R/   R0   R1   R2   R3   R(   R)   R*   R+   R'   R,   R6   R7   R8   R9   (   s   titles
   given_names   surnames   emails	   telephones   qualificationss   current_posts   hospitals   pictures   positions	   manifestos   sponsor_name_1s   sponsor_email_1s   sponsor_name_2s   sponsor_email_2(   R   R   R-   R   R   (    (    (    s5   /var/www/svtgbi.org/svtgbi/modules/elections/forms.pyR   W   s   (    (   R   R   R   R   (    (    (    s5   /var/www/svtgbi.org/svtgbi/modules/elections/forms.pyR4   8   s   	t   ElectionRegistrationDOBFormc           B   s$   e  Z d  „  Z d d d „  ƒ  YZ RS(   c         O   s|  | j  d ƒ } t t |  ƒ j | | Ž  g  } x' | D] } | j | j | j g ƒ q5 Wt |  j d _	 t |  j d _	 t |  j d _	 t |  j d _	 | |  j d _
 d |  j d _ d |  j d	 _ d
 |  j d	 _ d |  j d _ t |  j d _	 d |  j d _ d |  j d _ t |  j d _	 d |  j d _ t |  j d _	 d |  j d _ d |  j d _ t |  j d _	 d  S(   NR5   R3   R(   R)   R*   R'   s   Position applying fors   R&eacute;sum&eacute;R,   se   Please enter a short manifesto (200 words) including your date of birth to acompany your application.s   Proposer NameR6   s   Proposer EmailR7   sR   Please enter the email address of a current Member who will propose your candidacys   Seconder NameR8   s   Seconder EmailR9   sQ   Please enter the email address of a current Member who will second your candidacy(   R:   R   RB   R   R;   R<   R=   R%   R   R>   R?   R@   R   (   R   R   R   R5   R?   RA   (    (    s5   /var/www/svtgbi.org/svtgbi/modules/elections/forms.pyR   ]   s.    R   c           B   s   e  Z e Z d Z RS(   R/   R0   R1   R2   R3   R(   R)   R*   R+   t   date_of_birthR'   R,   R6   R7   R8   R9   (   s   titles
   given_names   surnames   emails	   telephones   qualificationss   current_posts   hospitals   pictures   date_of_births   positions	   manifestos   sponsor_name_1s   sponsor_email_1s   sponsor_name_2s   sponsor_email_2(   R   R   R-   R   R   (    (    (    s5   /var/www/svtgbi.org/svtgbi/modules/elections/forms.pyR   z   s   (    (   R   R   R   R   (    (    (    s5   /var/www/svtgbi.org/svtgbi/modules/elections/forms.pyRB   [   s   	N(   t   django.formsR    t   djangoR   t   modelst   modules.members.modelsR   R   R   R.   R4   RB   (    (    (    s5   /var/www/svtgbi.org/svtgbi/modules/elections/forms.pyt   <module>   s   



#