Exemplo n.º 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');
 }
 /**
  * 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');
 }
Exemplo n.º 3
0
 /**
  * Short description of method initForm
  *
  * @access public
  * @author Bertrand Chevrier, <*****@*****.**>
  * @return mixed
  */
 public function initForm()
 {
     $this->form = tao_helpers_form_FormFactory::getForm('loginForm');
     $connectElt = tao_helpers_form_FormFactory::getElement('connect', 'Submit');
     $connectElt->setValue(__('Log in'));
     $this->form->setActions(array($connectElt), 'bottom');
 }
Exemplo n.º 4
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');
 }
 /**
  * Short description of method initForm
  *
  * @access protected
  * @author Joel Bout, <*****@*****.**>
  * @return mixed
  */
 protected function initForm()
 {
     $this->form = \tao_helpers_form_FormFactory::getForm('roleDebug');
     $action = \tao_helpers_form_FormFactory::getElement('save', 'Free');
     $action->setValue('<button class="btn-info form-submiter" type="button" id="addButton"><span class="icon-tools"></span>' . __('Restrict') . '</button>');
     $this->form->setActions(array(), 'top');
     $this->form->setActions(array($action), 'bottom');
 }
 /**
  * Short description of method initForm
  *
  * @access public
  * @author Bertrand Chevrier, <*****@*****.**>
  * @return mixed
  */
 public function initForm()
 {
     $this->form = tao_helpers_form_FormFactory::getForm('mapping');
     $importElt = tao_helpers_form_FormFactory::getElement('import', 'Free');
     $importElt->setValue('<a href="#" class="form-submitter small li-inner waves-effect waves-light btn btn_small"><span class="icon-import"></span> ' . __('Import') . '</a>');
     $this->form->setActions(array($importElt), 'bottom');
     $this->form->setActions(array(), 'top');
 }
 public function initForm()
 {
     $name = isset($this->options['name']) ? $this->options['name'] : 'form_' . (count(self::$forms) + 1);
     unset($this->options['name']);
     $this->form = \tao_helpers_form_FormFactory::getForm($name, $this->options);
     $this->form->setActions(array(), 'top');
     $this->form->setActions(array(), 'bottom');
 }
Exemplo n.º 8
0
 /**
  * Short description of method initForm
  *
  * @access public
  * @author Bertrand Chevrier, <*****@*****.**>
  * @return mixed
  */
 public function initForm()
 {
     $this->form = tao_helpers_form_FormFactory::getForm('list');
     $addElt = tao_helpers_form_FormFactory::getElement('add', 'Free');
     $addElt->setValue('<a href="#" class="form-submitter btn-success small"><span class="icon-add"></span> ' . __('Add') . '</a>');
     $this->form->setActions(array($addElt), 'bottom');
     $this->form->setActions(array(), 'top');
 }
Exemplo n.º 9
0
 /**
  * Initialize password recovery form
  *
  * @access public
  * @author Aleh Hutnikau <*****@*****.**>
  */
 public function initForm()
 {
     $this->form = tao_helpers_form_FormFactory::getForm('passwordRecoveryForm');
     $connectElt = tao_helpers_form_FormFactory::getElement('recovery', 'Submit');
     $connectElt->setValue(__('Email'));
     $connectElt->setAttribute('class', 'btn-success small');
     $this->form->setActions(array($connectElt), 'bottom');
 }
 /**
  * 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);
 }
Exemplo n.º 11
0
 /**
  * Short description of method initForm
  *
  * @access public
  * @author Joel Bout, <*****@*****.**>
  * @return mixed
  */
 public function initForm()
 {
     $name = isset($this->options['name']) ? $this->options['name'] : 'form_' . (count(self::$forms) + 1);
     unset($this->options['name']);
     $this->form = tao_helpers_form_FormFactory::getForm($name, $this->options);
     //add create action in toolbar
     $action = tao_helpers_form_FormFactory::getElement('save', 'Free');
     $value = '<a href="#" class="form-submitter btn-success small"><span class="icon-save"></span> ' . __('Create') . '</a>';
     $action->setValue($value);
     $this->form->setActions(array($action), 'top');
     $this->form->setActions(array($action), 'bottom');
 }
Exemplo n.º 12
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);
     //create action in toolbar
     $createElt = \tao_helpers_form_FormFactory::getElement('create', 'Free');
     $createElt->setValue('<button class="btn-info" type="submit" id="addButton">' . \tao_helpers_Icon::iconAdd() . __('Create') . '</button>');
     $this->form->setActions(array(), 'top');
     $this->form->setActions(array($createElt), 'bottom');
 }
 /**
  * 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);
     //search action in toolbar
     $searchElt = tao_helpers_form_FormFactory::getElement('search', 'Free');
     $searchElt->setValue('<a href="#" class="form-submitter small li-inner waves-effect waves-light btn btn_small"><span class="icon-search"></span> ' . __('Search') . '</a>');
     $this->form->setActions(array($searchElt), 'top');
     $this->form->setActions(array($searchElt), 'bottom');
 }
Exemplo n.º 14
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);
     //search action in toolbar
     $searchElt = tao_helpers_form_FormFactory::getElement('search', 'Free');
     $searchElt->setValue('<button type="button" class="form-submitter btn-success small"><span class="icon-find"></span>' . __('Search') . '</button>');
     $this->form->setActions(array($searchElt), 'top');
     $this->form->setActions(array($searchElt), 'bottom');
 }
Exemplo n.º 15
0
 /**
  * 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');
 }
Exemplo n.º 16
0
 /**
  * Short description of method initForm
  *
  * @access public
  * @author Bertrand Chevrier, <*****@*****.**>
  * @return mixed
  */
 public function initForm()
 {
     $this->form = tao_helpers_form_FormFactory::getForm('import');
     $nextButton = true;
     if (isset($_POST['format'])) {
         if ($_POST['format'] != 'csv') {
             $nextButton = false;
         }
     }
     $submitElt = tao_helpers_form_FormFactory::getElement('import', 'Free');
     if ($nextButton) {
         $submitElt->setValue('<a href="#" class="form-submitter btn-success small"><span class="icon-next"></span> ' . __('Next') . '</a>');
     } else {
         $submitElt->setValue('<a href="#" class="form-submitter btn-success small"><span class="icon-import"></span> ' . __('Import') . '</a>');
     }
     $this->form->setActions(array($submitElt), 'bottom');
     $this->form->setActions(array(), 'top');
 }
 /**
  * Short description of method initForm
  *
  * @access public
  * @author Somsack Sipasseuth, <*****@*****.**>
  * @return mixed
  */
 public function initForm()
 {
     if (!isset($this->options['instanceUri'])) {
         throw new Exception(__('Option instanceUri is not an option !!'));
     }
     if (!isset($this->options['ownerUri'])) {
         throw new Exception(__('Option ownerUri is not an option !!'));
     }
     if (!isset($this->options['propertyUri'])) {
         throw new Exception(__('Option propertyUri is not an option !!'));
     }
     $this->ownerInstance = new core_kernel_classes_Resource($this->options['ownerUri']);
     $this->property = new core_kernel_classes_Property($this->options['propertyUri']);
     $this->versionedFile = new core_kernel_versioning_File($this->options['instanceUri']);
     $this->form = tao_helpers_form_FormFactory::getForm('versioned_file');
     $actions = tao_helpers_form_FormFactory::getElement('save', 'Free');
     $value = '';
     $value .= '<a href="#" class="form-submitter small li-inner waves-effect waves-light btn btn_small"><span class="icon-save"></span>' . __('Save') . '</a>';
     $actions->setValue($value);
     $this->form->setActions(array($actions), 'top');
     $this->form->setActions(array($actions), 'bottom');
 }
Exemplo n.º 18
0
 /**
  * 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');
 }
 public function nextActivityEditor(core_kernel_classes_Resource $connector, $type, $formName = 'nextActivityEditor')
 {
     if (!in_array($type, array('next', 'then', 'else'))) {
         throw new Exception('unknown type of next activity');
     }
     $myForm = tao_helpers_form_FormFactory::getForm($formName, array());
     $myForm->setActions(array(), 'bottom');
     //delete the default 'save' and 'revert' buttons
     $elements = $this->nextActivityElements($connector, $type);
     foreach ($elements as $element) {
         $myForm->addElement($element);
     }
     return $myForm;
 }
 /**
  * inits the import form
  *
  * @access public
  * @author Joel Bout, <*****@*****.**>
  * @return mixed
  */
 public function initForm()
 {
     $this->form = tao_helpers_form_FormFactory::getForm('import');
     $this->form->setActions(is_null($this->subForm) ? array() : $this->subForm->getActions('top'), 'top');
     $this->form->setActions(is_null($this->subForm) ? array() : $this->subForm->getActions('bottom'), 'bottom');
 }
Exemplo n.º 21
0
 /**
  * Initialize the form
  *
  * @access protected
  * @author Bertrand Chevrier, <*****@*****.**>
  * @return mixed
  */
 protected function initForm()
 {
     $this->form = tao_helpers_form_FormFactory::getForm('indexform', array());
 }