/**
  * This builds the expiry element including the
  * year and month control.
  *
  * @return void
  */
 protected function buildExpiryElements()
 {
     if ($this->isFixedCardExpiryActive()) {
         $expiryData = "<span class='fixed-expriy-month'>" . Customweb_Core_Util_Xml::escape($this->getSelectedExpiryMonth()) . '</span>';
         $expiryData .= "/<span class='fixed-expriy-year'>" . Customweb_Core_Util_Xml::escape($this->getSelectedExpiryYear()) . '</span>';
         $control = new Customweb_Form_Control_Html('expiry date', $expiryData);
         $this->expiryElement = new Customweb_Form_Element(Customweb_I18n_Translation::__('Card Expiration'), $control);
     } else {
         if ($this->getExpiryFieldName() !== null) {
             $this->buildSingleExpiryElement();
         } else {
             $this->createExpiryMonthControl();
             $this->createExpiryYearControl();
             $control = new Customweb_Form_Control_MultiControl('expiration', array($this->expiryMonthControl, $this->expiryYearControl));
             $this->expiryElement = new Customweb_Form_Element(Customweb_I18n_Translation::__('Card Expiration'), $control, Customweb_I18n_Translation::__('Select the date on which your card expires.'));
             $this->expiryElement->setElementIntention(Customweb_Form_Intention_Factory::getExpirationDateIntention())->setErrorMessage($this->getExpiryElementErrorMessage());
         }
     }
 }
 protected function buildAccountHolderElement()
 {
     if ($this->getAccountHolderFieldName() !== null) {
         $this->accountHolderControl = new Customweb_Form_Control_TextInput($this->getAccountHolderFieldName(), Customweb_Core_Util_Xml::escape($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());
     }
 }