/** * @param Customweb_Form_IButton $button */ public function __construct(Customweb_Form_IButton $button = null) { if ($button !== null) { $this->setId($button->getId()); $this->setMachineName($button->getMachineName()); $this->setTitle($button->getTitle()); $this->setType($button->getType()); } else { $this->setId(Customweb_Core_Util_Rand::getUuid()); $this->setType(self::TYPE_DEFAULT); } }
public function renderButton(Customweb_Form_IButton $button) { return '<button id="' . $button->getId() . '" title="' . $button->getTitle() . '" type="button" class="' . $this->getButtonClasses($button) . ' scalable save" onclick="if (' . ($this->isAddJs() ? 'validatePaymentFormElements() != false' : 'true') . ') { $(\'' . $this->formId . '-button\').value = \'' . $button->getMachineName() . '\'; $(\'' . $this->formId . '\').submit(); }"> <span><span><span>' . $button->getTitle() . '</span></span></span></button>'; }
public function renderButton(Customweb_Form_IButton $button) { return '<button type="submit" name="button[' . $button->getMachineName() . ']" title="' . $button->getTitle() . '" id="' . $button->getId() . '" class="button ' . $this->getButtonClass() . '"><span><span>' . $button->getTitle() . '</span></span></button>'; }