/**
  * This method creates a card holder name field.
  * The $fieldName is the name
  * of the input field. The $defaultCardHolderName can be used to set the
  * name of the customer.
  *
  * @param string $fieldName        	
  * @param string $defaultCardHolderName        	
  * @deprecated Use instead the Customweb_Payment_Authorization_Method_CreditCard_ElementBuilder
  * @return Customweb_Form_IElement
  */
 public static function getCardHolderElement($fieldName, $defaultCardHolderName = '', $errorMessage = null)
 {
     $control = new Customweb_Form_Control_TextInput($fieldName, $defaultCardHolderName);
     $control->addValidator(new Customweb_Form_Validator_NotEmpty($control, Customweb_I18n_Translation::__("You have to enter the card holder name on the card.")));
     $control->setAutocomplete(false);
     $element = new Customweb_Form_Element(Customweb_I18n_Translation::__('Card Holder Name'), $control, Customweb_I18n_Translation::__('Please enter here the card holder name on the card.'));
     $element->setElementIntention(Customweb_Form_Intention_Factory::getCardHolderNameIntention())->setErrorMessage($errorMessage);
     return $element;
 }
 /**
  * This method generates the card holder element and controls.
  *
  * @return void
  */
 protected function buildCardHolderElement()
 {
     if ($this->getCardHolderFieldName() !== null) {
         if ($this->isFixedCardHolderActive()) {
             $this->cardHolderControl = new Customweb_Form_Control_Html($this->getCardHolderFieldName(), Customweb_Core_Util_Xml::escape($this->getCardHolderName()));
         } else {
             $this->cardHolderControl = new Customweb_Form_Control_TextInput($this->getCardHolderFieldName(), Customweb_Core_Util_Xml::escape($this->getCardHolderName()));
             $this->cardHolderControl->addValidator(new Customweb_Form_Validator_NotEmpty($this->cardHolderControl, Customweb_I18n_Translation::__("You have to enter the card holder name on the card.")));
             $this->cardHolderControl->setAutocomplete(false);
         }
         $this->cardHolderElement = new Customweb_Form_Element(Customweb_I18n_Translation::__('Card Holder Name'), $this->cardHolderControl, Customweb_I18n_Translation::__('Please enter here the card holder name on the card.'));
         $this->cardHolderElement->setElementIntention(Customweb_Form_Intention_Factory::getCardHolderNameIntention())->setErrorMessage($this->getCardHolderElementErrorMessage());
     }
 }
 protected function buildAccountHolderElement()
 {
     if ($this->getAccountHolderFieldName() !== null) {
         $this->accountHolderControl = new Customweb_Form_Control_TextInput($this->getAccountHolderFieldName(), $this->getAccountHolderName());
         $this->accountHolderControl->addValidator(new Customweb_Form_Validator_NotEmpty($this->accountHolderControl, Customweb_I18n_Translation::__("You have to enter the account holder name.")));
         $this->accountHolderControl->setAutocomplete(false);
         $this->accountHolderElement = new Customweb_Form_Element(Customweb_I18n_Translation::__('Account Holder Name'), $this->accountHolderControl, Customweb_I18n_Translation::__('Please enter here the account holder name.'));
         $this->accountHolderElement->setElementIntention(Customweb_Form_Intention_Factory::getCardHolderNameIntention())->setErrorMessage($this->getAccountHolderErrorMessage());
     }
 }