public function init()
 {
     parent::init();
     /*
      * Translations
      */
     $subForm = new Zend_Form_SubForm('Translation');
     $langs = Model_Hm_Lang::listAll();
     foreach ($langs as $lang) {
         $subSubForm = new Zend_Form_SubForm($lang->code);
         $element = new Zend_Form_Element_Text('title');
         $element->setLabel('Titel (eigen)')->setDescription('Deze titel is voor gebruik in eigen administratie.')->setRequired(true);
         $subSubForm->addElement($element);
         $element = new Zend_Form_Element_Text('display_title');
         $element->setLabel('Titel (gebruiker)')->setDescription('Deze titel krijgen de gebruikesr van het systeem te zien.')->setRequired(true);
         $subSubForm->addElement($element);
         $element = new Zend_Form_Element_Textarea('description');
         $element->setLabel('Omschrijving')->setRequired(true)->setValidators(array(array('stringLength', false, array('min' => 40))))->setAttrib('class', 'autoexpand')->setAttrib('rows', 2);
         $subSubForm->addElement($element);
         $subSubForm->addDisplayGroup(array('title', 'display_title', 'description'), $lang->code, array('legend' => $lang->name, 'class' => 'textarea'));
         $subForm->addSubForm($subSubForm, $lang->code);
         $this->bhvkSubDecorators($subSubForm);
     }
     $this->addSubForm($subForm, 'Translation');
     $this->bhvkSubDecorators($subForm);
     /*
      * Submit
      */
     $element = new Zend_Form_Element_Submit('submit_chargeoptional');
     $element->setLabel('Verwerken')->setAttrib('class', 'submit');
     $this->addElement($element);
     $this->addDisplayGroup(array('submit_chargeoptional'), 'submit', array('class' => 'submit'));
     $this->bhvkDecorators();
     $this->bhvkDecorateSubmitElement($this->getElement('submit_chargeoptional'));
 }
 public function init()
 {
     parent::init();
     $subForm = new Zend_Form_SubForm('Translation');
     $langs = Model_Hm_Lang::listAll();
     foreach ($langs as $lang) {
         $subSubForm = new Zend_Form_SubForm($lang->code);
         $element = new Zend_Form_Element_Text('name');
         $element->setLabel('Naam')->setAttrib('maxlength', 64)->setValidators(array(array('stringLength', false, array('min' => 4, 'max' => 64))))->setRequired(true);
         $subSubForm->addElement($element);
         $element = new Zend_Form_Element_Textarea('description');
         $element->setLabel('Omschrijving')->setRequired(true)->setValidators(array(array('stringLength', false, array('min' => 40))))->setAttrib('class', 'autoexpand')->setAttrib('rows', 2);
         $subSubForm->addElement($element);
         $subSubForm->addDisplayGroup(array('name', 'description'), $lang->code, array('legend' => $lang->name, 'class' => 'textarea'));
         $subForm->addSubForm($subSubForm, $lang->code);
         $this->bhvkSubDecorators($subSubForm);
     }
     $this->addSubForm($subForm, 'Translation');
     $this->bhvkSubDecorators($subForm);
     $element = new Zend_Form_Element_Submit('submit_category');
     $element->setLabel('Verwerken')->setAttrib('class', 'submit');
     $this->addElement($element)->addDisplayGroup(array('submit_category'), 'submit', array('class' => 'submit'));
     $this->bhvkDecorators();
     $this->bhvkDecorateSubmit('submit_category');
 }
Пример #3
0
 public function init()
 {
     parent::init();
     $this->setAttrib('enctype', 'multipart/form-data');
     $element = new Zend_Form_Element_File('filename');
     $element->setLabel('Foto')->setDescription('Maximale grootte van de foto is 1mb')->setRequired(true)->setValidators(array(array('Count', false, 1), array('Size', false, 1024000), array('Extension', false, 'jpg,png,gif')))->setDestination(APPLICATION_PATH . '/../public/images/uploads/holidayhome/photos');
     $this->addElement($element);
     $this->addDisplayGroup(array('filename'), 'photogroup', array('legend' => 'Foto', 'class' => 'file'));
     $subForm = new Zend_Form_SubForm('Translation');
     foreach (Model_Hm_Lang::listAll() as $lang) {
         $subSubForm = new Zend_Form_SubForm($lang->code);
         $element = new Zend_Form_Element_Text('title');
         $element->setLabel('Titel')->setRequired(true)->setValidators(array(array('stringLength', null, array('min' => 4, 'max' => 64))));
         $subSubForm->addElement($element);
         $element = new Zend_Form_Element_Textarea('description');
         $element->setLabel('Omschrijving')->setAttrib('rows', 2)->setAttrib('class', 'autoexpand')->setRequired(true)->setValidators(array(array('stringLength', null, array('min' => 40))));
         $subSubForm->addElement($element);
         $subSubForm->addDisplayGroup(array('title', 'description'), $lang->code, array('class' => 'textarea', 'legend' => $lang->name));
         $this->bhvkSubDecorators($subSubForm);
         $subForm->addSubForm($subSubForm, $lang->code);
     }
     $this->bhvkSubDecorators($subForm);
     $this->addSubForm($subForm, 'Translation');
     $element = new Zend_Form_Element_Submit('photo_submit');
     $element->setLabel('Verwerken')->setAttrib('class', 'submit');
     $this->addElement($element);
     $this->addDisplayGroup(array('photo_submit'), 'submit', array('class' => 'submit'));
     $this->bhvkDecorators();
     $this->bhvkDecorateSubmit('photo_submit');
     $this->bhvkDecorateFile($this->getElement('filename'));
 }
Пример #4
0
 public function init()
 {
     parent::init();
     $this->setDecorators($this->_decorators);
     $this->setElementDecorators($this->_elementDecorators);
     $this->setDisplayGroupDecorators($this->_displayGroupDecorators);
 }
Пример #5
0
 public function init()
 {
     parent::init();
     $element = new Zend_Form_Element_Checkbox($this->getDate()->get("YYYY_MM_dd") . '_departure');
     $element->setLabel('Vertrek');
     $this->addElement($element);
     $element = new Zend_Form_Element_Checkbox($this->getDate()->get("YYYY_MM_dd") . '_arrival');
     $element->setLabel('Aankomst');
     $this->addElement($element);
     $this->setDecorators($this->_decorators);
     $this->setElementDecorators($this->_elementDecorators);
     $this->setDisplayGroupDecorators($this->_displayGroupDecorators);
 }
Пример #6
0
 public function init()
 {
     parent::init();
     /*
      * Options 
      */
     $element = new Zend_Form_Element_Checkbox('per_person');
     $element->setLabel('Per persoon')->setDescription('Selecteer deze optie wanneer u deze kosten 
             	per nacht per persoon wilt rekenen. Laat deze optie leeg 
             	wanneer u de kosten alleen per nacht wilt rekenen.');
     $this->addElement($element);
     $element = new Zend_Form_Element_Checkbox('visible');
     $element->setLabel('Zichtbaar')->setAttrib('checked', 'checked')->setDescription('Selecteer deze optie wanneer u wilt dat de 
             	kosten onzichtbaar worden berekend.');
     $this->addElement($element);
     $this->addDisplayGroup(array('per_person', 'visible'), 'info', array('legend' => 'Opties', 'class' => 'checkbox'));
     /*
      * Text
      */
     $element = new Zend_Form_Element_Text('exp');
     $element->setLabel('Expressies')->setDescription('Waarschuwing! Het is mogelijk om hier speciale 
             	expressies in te vullen. Indien u niet weet wat dit is, laat 
             	het veld leeg. U kunt de applicatie en betaal processen 
             	ernstige schade toebrengen.');
     $this->addElement($element);
     $this->addDisplayGroup(array('exp'), 'expas', array('legend' => 'Expressies'));
     /*
      * Translations
      */
     $subForm = new Zend_Form_SubForm('Translation');
     $langs = Model_Hm_Lang::listAll();
     foreach ($langs as $lang) {
         $subSubForm = new Zend_Form_SubForm($lang->code);
         $element = new Zend_Form_Element_Text('title');
         $element->setLabel('Titel (eigen)')->setDescription('Deze titel is voor gebruik in eigen administratie.')->setRequired(true);
         $subSubForm->addElement($element);
         $element = new Zend_Form_Element_Text('display_title');
         $element->setLabel('Titel (gebruiker)')->setDescription('Deze titel krijgen de gebruikesr van het systeem te zien.')->setRequired(true);
         $subSubForm->addElement($element);
         $element = new Zend_Form_Element_Textarea('description');
         $element->setLabel('Omschrijving')->setRequired(true)->setValidators(array(array('stringLength', false, array('min' => 40))))->setAttrib('class', 'autoexpand')->setAttrib('rows', 2);
         $subSubForm->addElement($element);
         $subSubForm->addDisplayGroup(array('title', 'display_title', 'description'), $lang->code, array('legend' => $lang->name, 'class' => 'textarea'));
         $subForm->addSubForm($subSubForm, $lang->code);
         $this->bhvkSubDecorators($subSubForm);
     }
     $this->addSubForm($subForm, 'Translation');
     $this->bhvkSubDecorators($subForm);
 }
Пример #7
0
 public function init()
 {
     parent::init();
     $username = new Zend_Form_Element_Text('login_username');
     $username->setLabel('Gebruikersnaam');
     $this->addElement($username);
     $password = new Zend_Form_Element_Password('login_password');
     $password->setLabel('Wachtwoord');
     $this->addElement($password);
     $submit = new Zend_Form_Element_Submit('login_submit');
     $submit->setLabel('Inloggen');
     $this->addElement($submit);
     $this->setDecorators(array('FormElements', 'Form'));
     $this->setElementDecorators(array('ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'p'))));
 }
Пример #8
0
 public function init()
 {
     parent::init();
     $element = new Zend_Form_Element_Text('width');
     $element->setLabel('Breedte in cm')->setRequired(true)->setFilters(array('int'));
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('length');
     $element->setLabel('Lengte in cm')->setRequired(true)->setFilters(array('int'));
     $this->addElement($element);
     $this->addDisplayGroup(array('width', 'length'), 'bed', array('legend' => 'Bed'));
     $element = new Zend_Form_Element_Submit('submit_bed');
     $element->setLabel('Verwerken')->setAttrib('class', 'submit');
     $this->addElement($element);
     $this->addDisplayGroup(array('submit_bed'), 'submit', array('class' => 'submit'));
     $this->bhvkDecorators();
     $this->bhvkDecorateSubmit('submit_bed');
 }
Пример #9
0
 public function init()
 {
     parent::init();
     $element = new Zend_Form_Element_Text('name');
     $element->setLabel('Taalnaam')->setRequired(true);
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('code');
     $element->setLabel('Taalcode')->setRequired(true)->setFilters(array('stringToUpper'));
     $this->addElement($element);
     $this->addDisplayGroup(array('name', 'code'), 'Taal', array('legend' => 'Taal'));
     $element = new Zend_Form_Element_Submit('submit_lang');
     $element->setLabel('Verwerken')->setAttrib('class', 'submit');
     $this->addElement($element);
     $this->addDisplayGroup(array('submit_lang'), 'lang', array('class' => 'submit'));
     $this->bhvkDecorators();
     $this->bhvkDecorateSubmit('submit_lang');
 }
Пример #10
0
 public function init()
 {
     parent::init();
     /*
      * Code
      */
     $element = new Zend_Form_Element_Text('code');
     $element->setLabel('Landcode')->setRequired(true);
     $this->addElement($element);
     /*
      * Areacode
      */
     $element = new Zend_Form_Element_Text('area_code');
     $element->setLabel('Netnummer')->setRequired(true);
     $this->addElement($element);
     $this->addDisplayGroup(array('code', 'area_code'), 'Algemeen', array('legend' => 'Gegevens'));
     /*
      * Translations
      */
     $subForm = new Zend_Form_SubForm('Translation');
     $langs = Model_Hm_Lang::listAll();
     foreach ($langs as $lang) {
         $subSubForm = new Zend_Form_SubForm($lang->code);
         /*
          * Name field
          */
         $element = new Zend_Form_Element_Text('name');
         $element->setLabel('Naam')->setAttrib('maxlength', 64)->setValidators(array(array('stringLength', false, array('min' => 4, 'max' => 64))))->setRequired(true);
         $subSubForm->addElement($element);
         $subSubForm->addDisplayGroup(array('name'), $lang->code, array('legend' => $lang->name, 'class' => 'textarea'));
         $subForm->addSubForm($subSubForm, $lang->code);
         $this->bhvkSubDecorators($subSubForm);
     }
     $this->addSubForm($subForm, 'Translation');
     $this->bhvkSubDecorators($subForm);
     /*
      * Submit
      */
     $element = new Zend_Form_Element_Submit('submit_country');
     $element->setLabel("Verwerken")->setAttrib('class', 'submit');
     $this->addElement($element);
     $this->addDisplayGroup(array('submit_country'), 'submit', array('class' => 'submit'));
     $this->bhvkDecorators();
     $this->bhvkDecorateSubmit('submit_country');
 }
Пример #11
0
 public function init()
 {
     parent::init();
     $element = new Zend_Form_Element_Select('hm_geo_region_id');
     $element->setLabel('Regio')->setRequired(true)->addMultiOption('', '...');
     $regions = Model_Hm_Geo_Region::findAllForAdmin()->execute();
     foreach ($regions as $region) {
         $element->addMultiOption($region->id, $region->Country->translationHandler()->name . ' - ' . $region->name);
     }
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('name');
     $element->setLabel('Naam')->setRequired(true)->setAttrib('maxlength', 128)->setValidators(array(array('stringLength', false, array('min' => 4, 'max' => 128))));
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('coordinate');
     $element->setLabel('Coordinaat')->setRequired(true)->setAttrib('maxlength', 32)->setValidators(array(array('stringLength', false, array('min' => 4, 'max' => 32))));
     $this->addElement($element);
     $this->addDisplayGroup(array('hm_geo_region_id', 'name', 'coordinate'), 'info', array('legend' => 'Algemeen'));
     /*
      * Translations
      */
     $subForm = new Zend_Form_SubForm('Translation');
     $langs = Model_Hm_Lang::listAll();
     foreach ($langs as $lang) {
         $subSubForm = new Zend_Form_SubForm($lang->code);
         /*
          * Name field
          */
         $element = new Zend_Form_Element_Textarea('description');
         $element->setLabel('Omschrijving')->setAttrib('class', 'autoexpand')->setAttrib('rows', 2)->setValidators(array(array('stringLength', false, array('min' => 40))))->setRequired(true);
         $subSubForm->addElement($element);
         $subSubForm->addDisplayGroup(array('description'), $lang->code, array('legend' => $lang->name, 'class' => 'textarea'));
         $subForm->addSubForm($subSubForm, $lang->code);
         $this->bhvkSubDecorators($subSubForm);
     }
     $this->addSubForm($subForm, 'Translation');
     $this->bhvkSubDecorators($subForm);
     $element = new Zend_Form_Element_Submit('submit_city');
     $element->setLabel('Verwerken')->setAttrib('class', 'submit');
     $this->addElement($element);
     $this->addDisplayGroup(array('submit_city'), 'submit', array('class' => 'submit'));
     $this->bhvkDecorators();
     $this->bhvkDecorateSubmit('submit_city');
 }
 public function init()
 {
     parent::init();
     $element = new Zend_Form_Element_Select('hm_bed_id');
     $element->setLabel('Bed (bxl) in cm')->addMultiOption('', '...')->setRequired(true);
     foreach (Model_Hm_Bed::listAll()->execute() as $bed) {
         $element->addMultiOption($bed->id, $bed->width . 'x' . $bed->length);
     }
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('amount');
     $element->setLabel('Aantal')->setFilters(array(array('int')))->setValidators(array(array('digits')))->setRequired(true);
     $this->addElement($element);
     $element = new Zend_Form_Element_Submit('submit_bed_amount');
     $element->setAttrib('class', 'submit')->setLabel('Verwerken');
     $this->addElement($element);
     $this->addDisplayGroup(array('hm_bed_id', 'amount'), 'Bed', array('legend' => 'Bed'));
     $this->addDisplayGroup(array('submit_bed_amount'), 'submit', array('class' => 'submit'));
     parent::bhvkDecorators();
     parent::bhvkDecorateSubmit('submit_bed_amount');
 }
Пример #13
0
 public function init()
 {
     parent::init();
     $subForm = new Zend_Form_SubForm('Translation');
     foreach (Model_Hm_Lang::listAll() as $lang) {
         $subSubForm = new Zend_Form_SubForm($lang->code);
         $element = new Zend_Form_Element_Textarea('content');
         $element->setLabel('Commentaar')->setAttrib('rows', 2)->setAttrib('class', 'autoexpand')->setRequired(true)->setValidators(array(array('stringLength', null, array('min' => 40))));
         $subSubForm->addElement($element);
         $subSubForm->addDisplayGroup(array('content'), $lang->code, array('class' => 'textarea', 'legend' => $lang->name));
         $this->bhvkSubDecorators($subSubForm);
         $subForm->addSubForm($subSubForm, $lang->code);
     }
     $this->bhvkSubDecorators($subForm);
     $this->addSubForm($subForm, 'Translation');
     $element = new Zend_Form_Element_Submit('submit_comment');
     $element->setLabel('Verwerken')->setAttrib('class', 'submit');
     $this->addElement($element);
     $this->addDisplayGroup(array('submit_comment'), 'submit', array('class' => 'submit'));
     $this->bhvkDecorators();
     $this->bhvkDecorateSubmit('submit_comment');
 }
Пример #14
0
 public function init()
 {
     parent::init();
     $element = new Zend_Form_Element_Select('hm_geo_country_id');
     $element->setLabel('Land')->setRequired(true)->addMultiOption('', '...');
     $countries = Model_Hm_Geo_Country::findAll()->execute();
     foreach ($countries as $country) {
         $element->addMultiOption($country->id, $country->translationHandler()->name);
     }
     $this->addElement($element);
     $this->addDisplayGroup(array('hm_geo_country_id'), 'country', array('legend' => 'Land'));
     $element = new Zend_Form_Element_Text('name');
     $element->setLabel('Naam')->setRequired(true);
     $this->addElement($element);
     $this->addDisplayGroup(array('name'), 'info', array('legend' => 'Naam'));
     $element = new Zend_Form_Element_Submit('submit_region');
     $element->setLabel('Verwerken')->setAttrib('class', 'submit');
     $this->addElement($element);
     $this->addDisplayGroup(array('submit_region'), 'sbumit', array('class' => 'submit'));
     $this->bhvkDecorators();
     $this->bhvkDecorateSubmit('submit_region');
 }
 public function init()
 {
     parent::init();
     $subForm = new Zend_Form_SubForm('Translation');
     $langs = Model_Hm_Lang::listAll();
     foreach ($langs as $lang) {
         $element = new Zend_Form_Element_Textarea('content');
         $element->setLabel('Content')->setRequired(true)->setAttrib('class', 'autoexpand')->setAttrib('rows', 2);
         $subSubForm = new Zend_Form_SubForm($lang->code);
         $subSubForm->addElement($element)->addDisplayGroup(array('content'), $lang->code, array('legend' => $lang->name, 'class' => 'textarea'));
         $subForm->addSubForm($subSubForm, $lang->code);
         $this->bhvkSubDecorators($subSubForm);
     }
     $this->addSubForm($subForm, 'Translation');
     $this->bhvkSubDecorators($subForm);
     $element = new Zend_Form_Element_Submit('infomail_submit');
     $element->setLabel('Verwerken')->setAttrib('class', 'submit');
     $this->addElement($element);
     $this->addDisplayGroup(array('infomail_submit'), 'submit', array('class' => 'submit'));
     $this->bhvkDecorators();
     $this->bhvkDecorateSubmit('infomail_submit');
 }
Пример #16
0
 public function init()
 {
     parent::init();
     $element = new Zend_Form_Element_Text('name');
     $element->setLabel('Landnaam')->setRequired(true);
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('numcode');
     $element->setLabel('Landcode')->setRequired(true);
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('iso2');
     $element->setLabel('ISO II')->setRequired(true);
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('iso3');
     $element->setLabel('ISO III')->setRequired(true);
     $this->addElement($element);
     $this->addDisplayGroup(array('name', 'numcode', 'iso2', 'iso3'), 'country', array('legend' => 'Landgegevens'));
     $element = new Zend_Form_Element_Submit('submit_pb_country');
     $element->setLabel('Verwerken')->setAttrib('class', 'submit');
     $this->addElement($element);
     $this->addDisplayGroup(array('submit_pb_country'), 'submit', array('class' => 'submit'));
     $this->bhvkDecorators();
     $this->bhvkDecorateSubmit('submit_pb_country');
 }
Пример #17
0
 public function init()
 {
     parent::init();
     $calenderHelp = new Model_Calendar_Helper();
     $amountDays = cal_days_in_month(CAL_GREGORIAN, $this->getMonth(), $this->getYear());
     $zendDate = new Zend_Date($this->getYear() . '-' . $this->getMonth() . '-' . '01', 'YYYY-MM-dd');
     $emptyFields = $zendDate->get(Zend_Date::WEEKDAY_8601) - 1;
     for ($i = 0; $i < $emptyFields; $i++) {
         $emtpyForm = new Reservation_Form_Holidayhome_Empty(array('class' => 'noneday'));
         $this->addSubForm($emtpyForm, $i);
     }
     for ($i = 1; $i <= $amountDays; $i++) {
         $zendDate = new Zend_Date($this->getYear() . '-' . $this->getMonth() . '-' . $i, 'YYYY-MM-dd');
         $form = $this->getDayForm(array('legend' => $zendDate->get(Zend_Date::WEEKDAY_NAME . ' - ' . Zend_Date::DAY), 'class' => 'day', 'date' => $zendDate));
         $this->addSubForm($form, $zendDate->get('YYYY_MM_dd'));
     }
     $element = new Zend_Form_Element_Submit('submit_dates');
     $element->setLabel('Verwerken')->setAttrib('class', 'submit');
     $this->addElement($element);
     $this->addDisplayGroup(array('submit_dates'), 'submit', array('class' => 'submit'));
     $this->bhvkDecorators();
     $this->bhvkDecorateSubmitElement($this->getElement('submit_dates'));
 }
 public function init()
 {
     parent::init();
     $element = new Zend_Form_Element_Text('date');
     $element->setLabel('Datum')->setDescription('De datum wanneer deze uitgave in rekening 
         	gebracht dient te worden. Voorbeeld: 24-08-1985')->setValidators(array(array('date', false, array('format' => 'dd-MM-YYYY')), array('stringLength', false, array('max' => 10))))->setAttribs(array('class' => 'datepicker', 'maxLength' => 10))->setRequired(true);
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('price');
     $element->setLabel('Prijs')->setRequired(true)->setValidators(array(array('float')));
     $this->addElement($element);
     $this->addDisplayGroup(array('date', 'price'), 'algemeen', array('legend' => 'Algemeen'));
     /*
      * Translations
      */
     $subForm = new Zend_Form_SubForm('Translation');
     $langs = Model_Hm_Lang::listAll();
     foreach ($langs as $lang) {
         $subSubForm = new Zend_Form_SubForm($lang->code);
         $element = new Zend_Form_Element_Textarea('description');
         $element->setLabel('Omschrijving')->setRequired(true)->setValidators(array(array('stringLength', false, array('min' => 40))))->setFilters(array('stripTags', 'htmlEntities'))->setAttrib('class', 'autoexpand')->setAttrib('rows', 2);
         $subSubForm->addElement($element);
         $subSubForm->addDisplayGroup(array('description'), $lang->code, array('legend' => $lang->name, 'class' => 'textarea'));
         $subForm->addSubForm($subSubForm, $lang->code);
         $this->bhvkSubDecorators($subSubForm);
     }
     $this->addSubForm($subForm, 'Translation');
     $this->bhvkSubDecorators($subForm);
     /*
      * 
      */
     $element = new Zend_Form_Element_Submit('submit_invoicecharge');
     $element->setLabel('Verwerken')->setAttrib('class', 'submit');
     $this->addElement($element);
     $this->addDisplayGroup(array('submit_invoicecharge'), 'submit', array('class' => 'submit'));
     $this->bhvkDecorators();
     $this->bhvkDecorateSubmit('submit_invoicecharge');
 }
Пример #19
0
 public function init()
 {
     parent::init();
     $element = new Zend_Form_Element_Text('debtor_no');
     $element->setLabel('Debiteur nummer')->setFilters(array('int'))->setRequired(true);
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('bank_no');
     $element->setLabel('Banknummer')->setRequired(true);
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('bank_bic');
     $element->setLabel('BIC')->setRequired(true);
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('bank_iban');
     $element->setLabel('IBAN')->setRequired(true);
     $this->addElement($element);
     $element = new Zend_Form_Element_Submit('owner_submit');
     $element->setLabel('Verwerken')->setAttrib('class', 'submit');
     $this->addElement($element);
     $this->addDisplayGroup(array('user_id', 'debtor_no'), 'Algemeen', array('legend' => 'Algemeen'));
     $this->addDisplayGroup(array('bank_no', 'bank_bic', 'bank_iban'), 'Bank', array('legend' => 'Bankgegevens'));
     $this->addDisplayGroup(array('owner_submit'), 'Submit', array('class' => 'submit'));
     $this->bhvkDecorators();
     $this->bhvkDecorateSubmit('owner_submit');
 }
 public function getValues($suppressArrayNotation = false)
 {
     $values = parent::getValues($suppressArrayNotation);
     $values['hm_home_id'] = $this->getHmHomeId();
     return $values;
 }
Пример #21
0
 public function init()
 {
     parent::init();
     $element = new Zend_Form_Element_Text('username');
     $element->setLabel('Gebruikersnaam')->setAttrib('maxlength', 100)->setValidators(array(array('alnum', false), array('stringLength', false, array('min' => 6, 'max' => 100))));
     $this->addElement($element);
     $element = new Zend_Form_Element_Password('password');
     $element->setLabel('Wachtwoord (nieuw)')->setAttrib('maxlength', 100)->setValidators(array(array('stringLength', false, array('min' => 6, 'max' => 100))));
     $this->addElement($element);
     $element = new Zend_Form_Element_Password('password_check');
     $element->setLabel('Wachtwoord (herhaling nieuw)')->setAttrib('maxlength', 100)->addPrefixPath('Jm_Validate', 'Jm/Validate', 'validate')->setValidators(array(array('PasswordConfirm'), array('stringLength', false, array('min' => 6, 'max' => 100))));
     $this->addElement($element);
     /*
      * 
      * Person fields
      * 
      */
     // @todo: Chars
     $element = new Zend_Form_Element_Text('initials');
     $element->setLabel('Voorletters')->setRequired(true)->setAttribs(array('maxlength' => 24))->setValidators(array(array('stringLength', false, array('max' => 24))));
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('insertion');
     $element->setLabel('Tussenvoegsel')->setAttribs(array('maxlength' => 16))->setValidators(array(array('stringLength', false, array('max' => 16))));
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('surname');
     $element->setLabel('Achternaam')->setRequired(true)->setAttribs(array('maxlength' => 100))->setValidators(array(array('stringLength', false, array('min' => 2, 'max' => 100))));
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('address');
     $element->setLabel('Straatnaam')->setRequired(true)->setAttribs(array('maxlength' => 100))->setValidators(array(array('stringLength', false, array('min' => 2, 'max' => 100))));
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('number');
     $element->setLabel('Huisnummer')->setRequired(true)->setAttribs(array('maxlength' => 16))->setValidators(array(array('stringLength', false, array('max' => 16))));
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('zipcode');
     $element->setLabel('Postcode')->setRequired(true)->setAttribs(array('maxlength' => 16))->setValidators(array(array('stringLength', false, array('max' => 16))));
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('city');
     $element->setLabel('Plaats')->setRequired(true)->setAttribs(array('maxlength' => 100))->setValidators(array(array('stringLength', false, array('min' => 2, 'max' => 100))));
     $this->addElement($element);
     // @todo: multilang
     $element = new Zend_Form_Element_Select('pb_geo_country_id');
     $element->setLabel('Land')->addMultiOption('', '...')->setRequired(true);
     $countries = Doctrine_Query::create()->from('Model_Pb_Geo_Country cr')->select('cr.id, cr.name')->orderBy('cr.name ASC')->execute(null, Doctrine_Core::HYDRATE_ARRAY);
     foreach ($countries as $country) {
         $element->addMultiOption($country['id'], $country['name']);
     }
     $this->addElement($element);
     // @todo: multilang
     $element = new Zend_Form_Element_Select('pb_lang_id');
     $element->setLabel('Taal')->addMultiOption('', '...')->setRequired(true);
     $langs = Doctrine_Query::create()->from('Model_Pb_Lang lg')->select('lg.id, lg.name')->orderBy('lg.name')->execute(null, Doctrine_Core::HYDRATE_ARRAY);
     foreach ($langs as $lang) {
         $element->addMultiOption($lang['id'], $lang['name']);
     }
     $this->addElement($element);
     // @todo: multilang
     $element = new Zend_Form_Element_Select('gender');
     $element->setLabel('Geslacht')->addMultiOption('', ' ')->addMultiOption('v', 'Vrouw')->addMultiOption('m', 'Man')->setRequired(true);
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('birth_at');
     $element->setLabel('Geboortedatum')->setRequired(true)->setValidators(array(array('date')));
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('person_no');
     $element->setLabel('Persoonnummer')->setDescription('Het persoonnummer vind u op uw 
                               identiteitskaart, paspoort of rijbewijs. 
                               Persoonnummer ook bekend als: Burger Service 
                               Nummer(BSN), SOFI nummer of burgernummer.')->setRequired(true)->addValidators(array(array('stringLength', false, array('min' => '6'))));
     $this->addElement($element);
     /*
      * 
      * Contact fields
      * 
      */
     $element = new Zend_Form_Element_Text('phone_pri');
     $element->setLabel('Primair telefoonnummer')->setRequired(true)->setAttrib('maxlength', 100)->setValidators(array(array('stringLength', false, array('min' => 4, 'max' => 100))))->setDescription('Vermeld hier het telefoonnummer waarmee u makkelijk 
             			      te bereiken bent. Onze voorkeur is een mobielnummer.');
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('phone_sec');
     $element->setLabel('Secundair telefoonnummer')->setAttrib('maxlength', 100)->setValidators(array(array('stringLength', false, array('min' => 4, 'max' => 100))));
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('fax');
     $element->setLabel('Fax')->setAttrib('maxlength', 100)->setValidators(array(array('stringLength', false, array('min' => 4, 'max' => 100))));
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('email');
     $element->setLabel('Email')->setRequired(true)->setValidators(array(array('emailAddress')));
     $this->addElement($element);
     /*
      * 
      * Bank fields
      * 
      */
     $element = new Zend_Form_Element_Text('bank_no');
     $element->setLabel('Banknummer')->setDescription('')->setValidators(array(array('stringLength', false, array('min' => 4, 'max' => 100))));
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('bank_bic');
     $element->setLabel('BIC')->setDescription('Bank Identifier Code')->setValidators(array(array('alnum'), array('stringLength', false, array('min' => 4, 'max' => 100))));
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('bank_iban');
     $element->setLabel('IBAN')->setDescription('International Bank Account Number')->setValidators(array(array('alnum'), array('stringLength', false, array('min' => 4, 'max' => 100))));
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('license_plate');
     $element->setLabel('Kenteken')->setDescription('Bij enkele woningen hebben wij uw kentenplaatnummer nodig.
         		Dit vanwege automatische kentekenherkenning.');
     $this->addElement($element);
     /*
      * 
      * Submit
      * 
      */
     $element = new Zend_Form_Element_Submit('user_submit');
     $element->setLabel('Gebruiker aanpassen')->setAttrib('class', 'submit');
     $this->addElement($element);
     /*
      * 
      * Fieldsets
      * 
      */
     $this->addDisplayGroup(array('initials', 'insertion', 'surname', 'gender', 'pb_lang_id', 'person_no', 'birth_at'), 'person', array('legend' => 'Persoongegevens'));
     $this->addDisplayGroup(array('address', 'number', 'zipcode', 'city', 'pb_geo_country_id', 'email', 'phone_pri', 'phone_sec', 'fax'), 'contact', array('legend' => 'Contactgegevens'));
     $this->addDisplayGroup(array('bank_no', 'bank_bic', 'bank_iban'), 'bank', array('legend' => 'Bankgegevens', 'description' => 'Wanneer u binnen Nederland woont moet u 
             				  alleen uw banknummer opgeven. Wanneer u buiten 
             				  Nederland woont, moet u BIC en IBAN opgeven.'));
     $this->addDisplayGroup(array('username', 'password_old', 'password', 'password_check'), 'login', array('legend' => 'Logingegevens', 'description' => 'Laat de velden leeg wanneer u niks wilt veranderen aan uw logingegevens.'));
     $this->addDisplayGroup(array('license_plate'), 'etc', array('legend' => 'Overige'));
     $this->addDisplayGroup(array('user_submit'), 'submit', array('class' => 'submit'));
     /*
      * 
      * Decorators
      * 
      */
     $this->setDecorators(array('FormElements', 'Form'));
     $this->setDisplayGroupDecorators(array('Description', 'FormElements', 'Fieldset'));
     $this->setElementDecorators(array('Description', 'ViewHelper', 'Errors', array(array('p' => 'HtmlTag'), array('tag' => 'p')), array('Label', array('tag' => 'p'))));
     $submit = $this->getElement('user_submit');
     $submit->setDecorators(array('ViewHelper'));
 }
Пример #22
0
 public function init()
 {
     parent::init();
 }