123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- <?php
- class PrestataireAdhesionForm extends sfForm {
- public static $HASH_KEYS = array(
- 'structure_name' => 'Nom de la structure',
- 'siret' => 'Siret',
- 'card_number' => 'Numéro de carte',
- 'card_lost' => 'Carte perdue ?',
- 'referent_first_name' => 'Prénom',
- 'referent_last_name' => 'Nom',
- 'email' => 'Email',
- 'telephone' => 'Téléphone',
- 'adress' => 'Adresse',
- 'zip_code' => 'Code postal',
- 'city' => 'Ville',
- 'payment_amount' => 'Montant adhésion',
- 'payment_mode' => 'Mode de paiement',
- 'payment_mode_cheque' => 'Numéro du chèque');
- public static $HASH_PAYMENT_MODE = array(
- '0' => 'Sols-Violette',
- '1' => 'Carte bancaire',
- '2' => 'Chèque',
- '3' => 'Espèces');
- public static $HASH_PAYMENT_AMOUNT = array(
- '0' => '100 € (adhésion classique)',
- '1' => '25 € + je parraine des solistes à hauteur de 75 € en leur offrant l\'adhésion',
- '2' => '25 € + je m\'engage à trouver des solistes pour parrainer ma structure à hauteur de 75 €',
- '3' => '+de 100 € (adhésion de soutien');
- public static $HASH_CARD_LOST = array(
- 'on' => 'Oui',
- 'off' => 'Non');
- public function configure()
- {
- $this->widgetSchema['structure_name'] = new sfWidgetFormInput();
- $this->validatorSchema['structure_name'] = new sfValidatorString(array('max_length' => 255), array('required' => 'Veuillez entrer le nom de la structure'));
- $this->widgetSchema->setLabel('structure_name', 'Nom de la structure');
- $this->widgetSchema['siret'] = new sfWidgetFormInput();
- $this->validatorSchema['siret'] = new sfValidatorString(array('max_length' => 255), array('required' => 'Veuillez entrer le numéro de SIRET'));
- $this->widgetSchema->setLabel('siret', 'SIRET');
- $this->widgetSchema['card_number'] = new sfWidgetFormInput();
- $this->validatorSchema['card_number'] = new sfValidatorString(array('max_length' => 255), array('required' => 'Veuillez entrer le numéro de la carte'));
- $this->widgetSchema->setLabel('card_number', 'Numéro de carte');
- $this->widgetSchema['card_lost'] = new sfWidgetFormInputCheckbox();
- $this->validatorSchema['card_lost'] = new sfValidatorPass();
- $this->widgetSchema->setLabel('card_lost', 'Carte perdue ?');
- $this->widgetSchema['referent_first_name'] = new sfWidgetFormInput();
- $this->validatorSchema['referent_first_name'] = new sfValidatorString(array('max_length' => 255), array('required' => 'Veuillez entrer le prénom du référent'));
- $this->widgetSchema->setLabel('referent_first_name', 'Prénom du référent');
- $this->widgetSchema['referent_last_name'] = new sfWidgetFormInput();
- $this->validatorSchema['referent_last_name'] = new sfValidatorString(array('max_length' => 255), array('required' => 'Veuillez entrer le nom du référent'));
- $this->widgetSchema->setLabel('referent_last_name', 'Nom du référent');
- $this->widgetSchema['email'] = new sfWidgetFormInput();
- $this->validatorSchema['email'] = new sfValidatorString(array('max_length' => 255), array('required' => 'Veuillez entrer l\'email'));
- $this->widgetSchema->setLabel('email', 'Email');
- $this->widgetSchema['telephone'] = new sfWidgetFormInput();
- $this->validatorSchema['telephone'] = new sfValidatorString(array('max_length' => 255), array('required' => 'Veuillez entrer le numéro de téléphone'));
- $this->widgetSchema->setLabel('telephone', 'Téléphone');
- $this->widgetSchema['adress'] = new sfWidgetFormInput();
- $this->validatorSchema['adress'] = new sfValidatorString(array('max_length' => 255), array('required' => 'Veuillez entrer l\'adresse physique'));
- $this->widgetSchema->setLabel('adress', 'Adresse');
- $this->widgetSchema['zip_code'] = new sfWidgetFormInput();
- $this->validatorSchema['zip_code'] = new sfValidatorString(array('max_length' => 255), array('required' => 'Veuillez entrer le code postal'));
- $this->widgetSchema->setLabel('zip_code', 'Code postal');
- $this->widgetSchema['city'] = new sfWidgetFormInput();
- $this->validatorSchema['city'] = new sfValidatorString(array('max_length' => 255), array('required' => 'Veuillez entrer la ville'));
- $this->widgetSchema->setLabel('city', 'Ville');
- $this->widgetSchema['payment_amount'] = new sfWidgetFormSelectRadio(array('choices' => array(0 => '100 € (adhésion classique)',
- 1 => '25 € + je parraine des solistes à hauteur de 75€ en leur offrant l\'adhésion',
- 2 => '25 € - je m\'engage à trouver des solistes pour parrainer ma structure à hauteur de 75 €',
- 3 => '+ de 100 € (adhésion de soutien)'
- )));
- $this->validatorSchema['payment_amount'] = new sfValidatorString(array('required' => 'Choisissez un montant'));
- $this->widgetSchema->setLabel('payment_amount', 'Choisissez le montant de votre adhésion ');
- $this->setDefault('payment_amount', 0);
- $this->widgetSchema['payment_mode'] = new sfWidgetFormSelectRadio(array('choices' => array(KataoMemberDeposit::PAYMENT_MODE_WITHDRAWAL => 'Sols-Violette',
- KataoMemberDeposit::PAYMENT_MODE_OTHER => 'Carte Bleue',
- KataoMemberDeposit::PAYMENT_MODE_CHECK => 'Chèque',
- KataoMemberDeposit::PAYMENT_MODE_CASH => 'Espèces')));
- $this->validatorSchema['payment_mode'] = new sfValidatorPass();
- $this->widgetSchema->setLabel('payment_mode', 'Mon moyen de paiement ');
- $this->setDefault('payment_mode', '0');
- $this->widgetSchema['payment_mode_cheque'] = new sfWidgetFormInput();
- $this->validatorSchema['payment_mode_cheque'] = new sfValidatorPass();
- $this->widgetSchema['payment_mode_cheque']->setAttributes(array('placeholder' => 'Numéro du chèque'));
- $this->widgetSchema->setLabel('payment_mode_cheque', 'Numéro du chèque ');
- $this->widgetSchema->setNameFormat('form_presta_subscription[%s]');
- }
- }
- ?>
|