public static function getCompanyElement($fieldName, $defaultCompanyName = '') { $control = new Customweb_Form_Control_TextInput($fieldName, $defaultCompanyName); $control->setAutocomplete(true); $element = new Customweb_Form_Element(Customweb_I18n_Translation::__('Company name'), $control, Customweb_I18n_Translation::__('Please enter the name of your company if you order for your company.')); $element->setElementIntention(Customweb_Saferpay_IntentionFactory::getCompanyNameIntention()); return $element; }
/** * Creates the CVC control and adds the basic not empty validator, if required. * * @return void */ protected function createCVCControl() { $this->cvcControl = new Customweb_Form_Control_TextInput($this->getCvcFieldName()); $this->cvcControl->setAutocomplete(false); if ($this->isCvcElementRequired()) { $this->cvcControl->addValidator(new Customweb_Form_Validator_NotEmpty($this->cvcControl, Customweb_I18n_Translation::__("You have to enter the CVC code from your card."))); } $validator = new Customweb_Payment_Authorization_Method_CreditCard_CvcValidator($this->cvcControl, Customweb_I18n_Translation::__("Please check the entered CVC number."), $this->getCardHandlerJavaScriptNameSpace()); $this->cvcControl->addValidator($validator); }
/** * Create an element for the bank's location. * * @param string $fieldName * @param string $errorMessage * @return Customweb_Form_Element */ public static function getBankLocationElement($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 the location of your bank."))); $control->setAutocomplete(false); $element = new Customweb_Form_Element(Customweb_I18n_Translation::__('Bank Location'), $control, Customweb_I18n_Translation::__('Please enter the location of your bank.')); $element->setElementIntention(Customweb_Form_Intention_Factory::getBankLocationIntention())->setErrorMessage($errorMessage); return $element; }