Exemplo n.º 1
0
 /**
  * Add a submit button to this form and one to manually validate the configuration
  *
  * Calls parent::addSubmitButton() to add the submit button.
  *
  * @return  $this
  */
 public function addSubmitButton()
 {
     parent::addSubmitButton()->getElement('btn_submit')->setDecorators(array('ViewHelper'));
     $this->addElement('submit', 'resource_validation', array('ignore' => true, 'label' => $this->translate('Validate Configuration'), 'data-progress-label' => $this->translate('Validation In Progress'), 'decorators' => array('ViewHelper')));
     $this->setAttrib('data-progress-element', 'resource-progress');
     $this->addElement('note', 'resource-progress', array('decorators' => array('ViewHelper', array('Spinner', array('id' => 'resource-progress')))));
     $this->addDisplayGroup(array('btn_submit', 'resource_validation', 'resource-progress'), 'submit_validation', array('decorators' => array('FormElements', array('HtmlTag', array('tag' => 'div', 'class' => 'control-group form-controls')))));
     return $this;
 }
Exemplo n.º 2
0
 /**
  * Add a submit button to this form and one to manually validate the configuration
  *
  * Calls parent::addSubmitButton() to add the submit button.
  *
  * @return  $this
  */
 public function addSubmitButton()
 {
     parent::addSubmitButton()->getElement('btn_submit')->setDecorators(array('ViewHelper'));
     $this->addElement('submit', 'backend_validation', array('ignore' => true, 'label' => $this->translate('Validate Configuration'), 'decorators' => array('ViewHelper')));
     $this->addDisplayGroup(array('btn_submit', 'backend_validation'), 'submit_validation', array('decorators' => array('FormElements', array('HtmlTag', array('tag' => 'div', 'class' => 'control-group')))));
     return $this;
 }