コード例 #1
0
 /**
  * Short description of method initForm
  *
  * @access public
  * @author Joel Bout, <*****@*****.**>
  * @return mixed
  */
 public function initForm()
 {
     $this->form = tao_helpers_form_FormFactory::getForm('password');
     $actions = tao_helpers_form_FormFactory::getCommonActions('top');
     $this->form->setActions($actions, 'top');
     $this->form->setActions($actions, 'bottom');
 }
コード例 #2
0
 /**
  * Initialize the form
  *
  * @access protected
  * @author Bertrand Chevrier, <*****@*****.**>
  * @return mixed
  */
 protected function initForm()
 {
     isset($this->options['name']) ? $name = $this->options['name'] : ($name = '');
     if (empty($name)) {
         $name = 'form_' . (count(self::$forms) + 1);
     }
     unset($this->options['name']);
     $this->form = tao_helpers_form_FormFactory::getForm($name, $this->options);
     isset($this->options['property_mode']) ? $propMode = $this->options['property_mode'] : ($propMode = 'simple');
     //add property action in toolbar
     $actions = tao_helpers_form_FormFactory::getCommonActions();
     $propertyElt = tao_helpers_form_FormFactory::getElement('property', 'Free');
     $propertyElt->setValue("<a href='#' class='btn-info property-adder small li-inner waves-effect waves-light btn btn_small'><span class='icon-property-add'></span> " . __('Add property') . "</a>");
     $actions[] = $propertyElt;
     //property mode
     $propModeELt = tao_helpers_form_FormFactory::getElement('propMode', 'Free');
     if ($propMode == 'advanced') {
         $propModeELt->setValue("<a href='#' class='btn-info property-mode small property-mode-simple'><span class='icon-property-advanced'></span> " . __('Simple Mode') . "</a>");
     } else {
         $propModeELt->setValue("<a href='#' class='btn-info property-mode small property-mode-advanced'><span class='icon-property-advanced'></span> " . __('Advanced Mode') . "</a>");
     }
     $actions[] = $propModeELt;
     //add a hidden field that states it is a class edition form.
     $classElt = tao_helpers_form_FormFactory::getElement('tao.forms.class', 'Hidden');
     $classElt->setValue('1');
     $classElt->addClass('global');
     $this->form->addElement($classElt);
     $this->form->setActions($actions, 'top');
     $this->form->setActions($actions, 'bottom');
 }
コード例 #3
0
 /**
  * Short description of method initForm
  *
  * @access protected
  * @author Joel Bout, <*****@*****.**>
  * @return mixed
  */
 protected function initForm()
 {
     $this->form = tao_helpers_form_FormFactory::getForm('settings');
     $actions = tao_helpers_form_FormFactory::getCommonActions('top');
     $this->form->setActions(array(), 'top');
     $this->form->setActions($actions, 'bottom');
 }
コード例 #4
0
ファイル: class.Translate.php プロジェクト: nagyist/tao-core
 /**
  * Initialize the form
  *
  * @access protected
  * @author Bertrand Chevrier, <*****@*****.**>
  * @return mixed
  */
 protected function initForm()
 {
     parent::initForm();
     $this->form->setName('translate_' . $this->form->getName());
     $actions = tao_helpers_form_FormFactory::getCommonActions('top');
     $this->form->setActions($actions, 'top');
     $this->form->setActions($actions, 'bottom');
 }
コード例 #5
0
ファイル: class.Instance.php プロジェクト: oat-sa/tao-core
 /**
  * Initialize the form
  *
  * @access protected
  * @author Bertrand Chevrier, <*****@*****.**>
  * @return mixed
  */
 protected function initForm()
 {
     $name = isset($this->options['name']) ? $this->options['name'] : '';
     if (empty($name)) {
         $name = 'form_' . (count(self::$forms) + 1);
     }
     unset($this->options['name']);
     $this->form = tao_helpers_form_FormFactory::getForm($name, $this->options);
     //add translate action in toolbar
     $actions = tao_helpers_form_FormFactory::getCommonActions();
     //add a hidden form element that states that it is an Instance Form.
     $instanceElt = tao_helpers_form_FormFactory::getElement('tao.forms.instance', 'Hidden');
     $instanceElt->setValue('1');
     $this->form->addElement($instanceElt);
     $this->form->setActions($actions, 'top');
     $this->form->setActions($actions, 'bottom');
 }
コード例 #6
0
ファイル: class.Instance.php プロジェクト: nagyist/tao-core
 /**
  * Initialize the form
  *
  * @access protected
  * @author Bertrand Chevrier, <*****@*****.**>
  * @return mixed
  */
 protected function initForm()
 {
     $name = isset($this->options['name']) ? $this->options['name'] : '';
     if (empty($name)) {
         $name = 'form_' . (count(self::$forms) + 1);
     }
     unset($this->options['name']);
     $this->form = tao_helpers_form_FormFactory::getForm($name, $this->options);
     //add translate action in toolbar
     $actions = tao_helpers_form_FormFactory::getCommonActions();
     //		if(!tao_helpers_Context::check('STANDALONE_MODE')){
     //			$translateELt = tao_helpers_form_FormFactory::getElement('translate', 'Free');
     //			$translateELt->setValue("<a href='#' class='form-translator' ><img src='".TAOBASE_WWW."/img/translate.png'  /> ".__('Translate')."</a>");
     //			$actions[] = $translateELt;
     //		}
     //add a hidden form element that states that it is an Instance Form.
     $instanceElt = tao_helpers_form_FormFactory::getElement('tao.forms.instance', 'Hidden');
     $instanceElt->setValue('1');
     $this->form->addElement($instanceElt);
     $this->form->setActions($actions, 'top');
     $this->form->setActions($actions, 'bottom');
 }