protected function buildIbanElement() { if ($this->getIbanFieldName() !== null) { $this->ibanControl = new Customweb_Form_Control_TextInput($this->getIbanFieldName()); $this->ibanControl->addValidator(new Customweb_Form_Validator_NotEmpty($this->ibanControl, Customweb_I18n_Translation::__("You have to enter the IBAN."))); $this->ibanControl->setAutocomplete(false); $this->ibanElement = new Customweb_Form_Element(Customweb_I18n_Translation::__('IBAN'), $this->ibanControl, Customweb_I18n_Translation::__('Please enter here the International Bank Account Number (IBAN).')); $this->ibanElement->setElementIntention(Customweb_Form_Intention_Factory::getIbanNumberIntention())->setErrorMessage($this->getIbanErrorMessage()); } }
/** * This method creates a Iban number element * * @param String $fieldName * the Iban number * @param string $errorMessage * @return Customweb_Form_Element */ public static function getIbanNumberElement($fieldName, $errorMessage = null) { $control = new Customweb_Form_Control_TextInput($fieldName); $control->addValidator(new Customweb_Form_Validator_NotEmpty($control, Customweb_I18n_Translation::__("You have to enter your IBAN Number."))); $control->setAutocomplete(false); $element = new Customweb_Form_Element(Customweb_I18n_Translation::__('IBAN number'), $control, Customweb_I18n_Translation::__('Please enter your IBAN number.')); $element->setElementIntention(Customweb_Form_Intention_Factory::getIbanNumberIntention())->setErrorMessage($errorMessage); return $element; }