ó
ñ)ýWc           @   sö  d  d l  m Z d  d l m Z d  d l m Z d  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 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 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) e f d* „  ƒ  YZ d+ e f d, „  ƒ  YZ d- S(.   iÿÿÿÿ(   t	   ModelForm(   t   forms(   t   User(   t   *t   MeetingFormc           B   s$   e  Z d  „  Z d d d „  ƒ  YZ RS(   c         O   s-   t  t |  ƒ j | | Ž  d |  j d _ d  S(   Ns-   Leave blank to allow non-members to register.t   limit_booking_to_member_types(   t   superR   t   __init__t   fieldst	   help_text(   t   selft   argst   kwargs(    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR   	   s    t   Metac           B   s   e  Z e Z d Z RS(   t   slugt   categoryt   confirmation_message(   s   slugs   categorys   confirmation_message(   t   __name__t
   __module__t   Meetingt   modelt   exclude(    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR      s   (    (   R   R   R   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR      s   	t   MeetingConfirmationFormc           B   s   e  Z d  d d „  ƒ  YZ RS(   R   c           B   s   e  Z e Z d Z RS(   R   (   s   confirmation_message(   R   R   R   R   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR      s   (    (   R   R   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR      s   t   MeetingDuplicateFormc           B   s   e  Z d  d d „  ƒ  YZ RS(   R   c           B   s   e  Z e Z d Z RS(   R   (   s   slug(   R   R   R   R   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR      s   (    (   R   R   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR      s   t   MeetingResourceFormc           B   s   e  Z d  d d „  ƒ  YZ RS(   R   c           B   s   e  Z e Z d Z RS(   t   meeting(   s   meeting(   R   R   t   MeetingResourceR   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR      s   (    (   R   R   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR      s   t   MeetingSessionCategoryFormc           B   s   e  Z d  d d „  ƒ  YZ RS(   R   c           B   s   e  Z e Z d Z RS(   R   (   s   meeting(   R   R   t   MeetingSessionCategoryR   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR   #   s   (    (   R   R   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR   !   s   t   MeetingSessionFormc           B   s   e  Z d  d d „  ƒ  YZ RS(   R   c           B   s   e  Z e Z d Z RS(   R   (   s   meeting(   R   R   t   MeetingSessionR   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR   )   s   (    (   R   R   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR   '   s   t   MeetingBookingTypeFormc           B   s$   e  Z d  „  Z d d d „  ƒ  YZ RS(   c         O   s-   t  t |  ƒ j | | Ž  d |  j d _ d  S(   Ns7   Leave blank to allow non-members to choose this option.t   limit_to_member_types(   R   R   R   R   R	   (   R
   R   R   (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR   /   s    R   c           B   s   e  Z e Z d Z RS(   R   t   enabled(   s   meetings   enabled(   R   R   t   MeetingBookingTypeR   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR   3   s   (    (   R   R   R   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR   -   s   	t   MeetingSocialEventFormc           B   s   e  Z d  d d „  ƒ  YZ RS(   R   c           B   s   e  Z e Z d Z RS(   R   (   s   meeting(   R   R   t   MeetingSocialEventR   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR   9   s   (    (   R   R   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR#   7   s   t   MeetingDayFormc           B   s   e  Z d  d d „  ƒ  YZ RS(   R   c           B   s   e  Z e Z d Z RS(   R   (   s   meeting(   R   R   t
   MeetingDayR   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR   ?   s   (    (   R   R   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR%   =   s   t   MeetingBookingFormc           B   s   e  Z d  d d „  ƒ  YZ RS(   R   c           B   s   e  Z e Z d Z RS(   t   titlet
   given_namet   surnamet   email_addresst   membership_number(   s   titles
   given_names   surnames   email_addresss   membership_number(   R   R   t   MeetingBookingR   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR   E   s   (    (   R   R   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR'   C   s   t   MeetingBookingInstitutionFormc           B   s$   e  Z d  „  Z d d d „  ƒ  YZ RS(   c         O   sM   t  t |  ƒ j | | Ž  t |  j d _ t |  j d _ d |  j d _ d  S(   Nt   institutiont	   job_titles   Institution / Trust(   R   R.   R   t   TrueR   t   requiredt   label(   R
   R   R   (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR   L   s    R   c           B   s   e  Z e Z d Z RS(   R/   t   trustR0   (   s   institutions   trusts	   job_title(   R   R   R-   R   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR   R   s   (    (   R   R   R   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR.   J   s   	t   MeetingBookingAddressFormc           B   s$   e  Z d  „  Z d d d „  ƒ  YZ RS(   c         O   sm   t  t |  ƒ j | | Ž  t |  j d _ t |  j d _ t |  j d _ t |  j d _ t |  j d _ d  S(   Nt   hospitalt	   address_1t   townt   countryt   postcode(   R   R5   R   R1   R   R2   (   R
   R   R   (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR   Y   s    R   c        	   B   s   e  Z e Z d	 Z RS(
   R6   R7   t	   address_2R8   t   countyR9   R:   t	   telephonet   requirements(	   s   hospitals	   address_1s	   address_2s   towns   countys   countrys   postcodes	   telephones   requirements(   R   R   R-   R   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR   a   s   (    (   R   R   R   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR5   W   s   	t   MeetingBookingFormEditc           B   s$   e  Z d  „  Z d d d „  ƒ  YZ RS(   c         O   sI   t  t |  ƒ j | | Ž  |  j j d k rE t |  j d j j d <n  d  S(   Nt   memberR+   t   readonly(	   R   R?   R   t   instancet   registrant_typeR1   R   t   widgett   attrs(   R
   R   R   (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR   g   s    R   c           B   s   e  Z e Z d Z RS(   R(   R)   R*   R+   (   s   titles
   given_names   surnames   email_address(   R   R   R-   R   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR   l   s   (    (   R   R   R   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR?   e   s   	t   MeetingBookingFormAdminc           B   s$   e  Z d  „  Z d d d „  ƒ  YZ RS(   c         O   s-   t  t |  ƒ j | | Ž  t |  j d _ d  S(   Nt   type(   R   RF   R   R1   R   R2   (   R
   R   R   (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR   r   s    R   c           B   s   e  Z e Z d Z RS(   R(   R)   R*   R+   RG   (   s   titles
   given_names   surnames   email_addresss   type(   R   R   R-   R   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR   v   s   (    (   R   R   R   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyRF   p   s   	t   MeetingBookingAddressFormAdminc           B   s$   e  Z d  „  Z d d d „  ƒ  YZ RS(   c         O   s-   t  t |  ƒ j | | Ž  t |  j d _ d  S(   NR/   (   R   RH   R   R1   R   R2   (   R
   R   R   (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR   |   s    R   c           B   s   e  Z e Z d Z RS(   R/   R0   R4   R6   R7   R;   R8   R<   R9   R:   R=   R>   (   s   institutions	   job_titles   trusts   hospitals	   address_1s	   address_2s   towns   countys   countrys   postcodes	   telephones   requirements(   R   R   R-   R   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR   €   s   (    (   R   R   R   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyRH   z   s   	t   MeetingBookingPaymentFormAdminc           B   s$   e  Z d  „  Z d d d „  ƒ  YZ RS(   c         O   s-   t  t |  ƒ j | | Ž  d |  j d _ d  S(   Ns5   Has been paid or is free, send the confirmation emailt   paid(   R   RI   R   R   R3   (   R
   R   R   (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR   †   s    R   c           B   s   e  Z e Z d Z RS(   RJ   t   payment_method(   s   paids   payment_method(   R   R   R-   R   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR   ‰   s   (    (   R   R   R   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyRI   „   s   	t   MeetingBookingNotesFormAdminc           B   s$   e  Z d  d d „  ƒ  YZ d „  Z RS(   R   c           B   s   e  Z e Z d Z RS(   t
   price_paidt   notes(   s
   price_paids   notes(   R   R   R-   R   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR      s   c         C   sA   |  j  j d ƒ } y t | ƒ | SWn t j d ƒ ‚ n Xd  S(   NRM   u.   Please ensure the price paid is a valid amount(   t   cleaned_datat   gett   floatR   t   ValidationError(   R
   RM   (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyt   clean_price_paid“   s    
(    (   R   R   R   RS   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyRL      s   t   MeetingBookingInvoiceFormc           B   s   e  Z d  d d „  ƒ  YZ RS(   R   c           B   s   e  Z e Z d Z RS(   t   meeting_booking(   s   meeting_booking(   R   R   t   MeetingBookingInvoiceR   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR      s   (    (   R   R   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyRT   ›   s   t   MeetingMemberBookingFormc           B   s   e  Z d  d d „  ƒ  YZ RS(   R   c           B   s   e  Z e Z d Z RS(   R(   R)   R*   R+   R,   (   s   titles
   given_names   surnames   email_addresss   membership_number(   R   R   R-   R   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR   ¥   s   (    (   R   R   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyRW   £   s   t   MeetingMemberBookingTypeFormc           B   s$   e  Z d  „  Z d d d „  ƒ  YZ RS(   c         O   s-   t  t |  ƒ j | | Ž  t |  j d _ d  S(   NRG   (   R   RX   R   R1   R   R2   (   R
   R   R   (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR   ¬   s    R   c           B   s   e  Z e Z d Z RS(   RG   (   s   type(   R   R   R-   R   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyR   °   s   (    (   R   R   R   R   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyRX   ª   s   	N(   t   django.formsR    t   djangoR   t   django.contrib.auth.modelsR   t   modelsR   R   R   R   R   R   R   R#   R%   R'   R.   R5   R?   RF   RH   RI   RL   RT   RW   RX   (    (    (    s;   /var/www/svtgbi.org/svtgbi/modules/meeting_booking/forms.pyt   <module>   s.   




	