/**
  * Add a image
  *
  * @method get
  * @route /media/image/add
  */
 public function addAction()
 {
     $di = Di::getDefault();
     $baseUrl = rtrim($di->get('config')->get('global', 'base_url'), '/');
     $form = new Wizard($baseUrl . '/media/image/add', array('id' => 0));
     $form->getFormFromDatabase();
     echo $form->generate();
 }
 /**
  * addtouser a timezone
  *
  * @method get
  * @route /timezone/addtouser
  */
 public function addtouserAction()
 {
     $di = Di::getDefault();
     $config = $di->get('config');
     $form = new Wizard('/centreon-administration/timezone/addtouser', array('id' => ''));
     $form->getFormFromDatabase();
     $this->tpl->assign('validateUrl', '/centreon-administration/user/settimezone');
     echo $form->generate();
 }
Exemple #3
0
 /**
  * Get wizard for add a object
  *
  * Response HTML
  *
  * @method get
  * @route /{object}/add
  */
 public function addAction()
 {
     $this->tpl->assign('validateUrl', $this->objectBaseUrl . "/add");
     $form = new Wizard($this->objectBaseUrl . '/add', array('id' => 0));
     $form->getFormFromDatabase();
     $form->addHiddenComponent('object', static::$objectName);
     $form->addHiddenComponent('module', static::$moduleName);
     $this->tpl->assign('formName', $form->getName());
     $formGen = str_replace(array('alertMessage', 'alertClose'), array('alertModalMessage', 'alertModalClose'), $form->generate());
     echo $formGen;
 }