Example #1
0
 /**
  * Execute the action
  */
 public function execute()
 {
     // call parent, this will probably add some general CSS/JS or other required files
     parent::execute();
     // add js
     $this->header->addJS('jstree/jquery.tree.js');
     $this->header->addJS('jstree/lib/jquery.cookie.js');
     $this->header->addJS('jstree/plugins/jquery.tree.cookie.js');
     // add css
     $this->header->addCSS('/backend/modules/pages/js/jstree/themes/fork/style.css', null, true);
     // get the templates
     $this->templates = BackendExtensionsModel::getTemplates();
     $this->isGod = BackendAuthentication::getUser()->isGod();
     // init var
     $defaultTemplateId = BackendModel::getModuleSetting($this->getModule(), 'default_template', false);
     // fallback
     if ($defaultTemplateId === false) {
         // get first key
         $keys = array_keys($this->templates);
         // set the first items as default if no template was set as default.
         $defaultTemplateId = $this->templates[$keys[0]]['id'];
     }
     // set the default template as checked
     $this->templates[$defaultTemplateId]['checked'] = true;
     // get the extras
     $this->extras = BackendExtensionsModel::getExtras();
     $this->loadForm();
     $this->validateForm();
     $this->parse();
     $this->display();
 }
Example #2
0
 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     $this->loadForm();
     $this->validateForm();
     $this->parse();
     $this->display();
 }
Example #3
0
 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     $this->cm = BackendMailmotorCMHelper::getCM();
     $this->loadForm();
     $this->validateForm();
     $this->parse();
     $this->display();
 }
Example #4
0
 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     $this->templates = BackendContentBlocksModel::getTemplates();
     $this->loadForm();
     $this->validateForm();
     $this->parse();
     $this->display();
 }
Example #5
0
 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     $this->groupId = $this->getParameter('group_id', 'int');
     $this->loadForm();
     $this->validateForm();
     $this->parse();
     $this->display();
 }
Example #6
0
 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     // load additional js
     $this->header->addJS('theme_template.js');
     // load data
     $this->loadData();
     $this->loadForm();
     $this->validateForm();
     $this->parse();
     $this->display();
 }
 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     // the user email and key provided match
     if (!$this->isUserAllowed()) {
         $this->redirect(BackendModel::createURLForAction('index'));
     }
     $this->loadForm();
     $this->validateForm();
     $this->parse();
     $this->display();
 }
Example #8
0
 /**
  * Execute the action
  *
  * @return	void
  */
 public function execute()
 {
     // call parent, this will probably add some general CSS/JS or other required files
     parent::execute();
     // load the form
     $this->loadForm();
     // validates the form
     $this->validateForm();
     // parse
     $this->parse();
     // display the page
     $this->display();
 }
Example #9
0
 /**
  * Execute the action
  *
  * @return	void
  */
 public function execute()
 {
     // call parent, this will probably add some general CSS/JS or other required files
     parent::execute();
     // store CM object
     $this->cm = BackendMailmotorCMHelper::getCM();
     // load the form
     $this->loadForm();
     // validate the form
     $this->validateForm();
     // parse
     $this->parse();
     // display the page
     $this->display();
 }
Example #10
0
 /**
  * Execute the action
  *
  * @return	void
  */
 public function execute()
 {
     // call parent, this will probably add some general CSS/JS or other required files
     parent::execute();
     // fetch available templates
     $this->templates = BackendContentBlocksModel::getTemplates();
     // load the form
     $this->loadForm();
     // validate the form
     $this->validateForm();
     // parse
     $this->parse();
     // display the page
     $this->display();
 }
Example #11
0
 /**
  * Execute the action
  *
  * @return	void
  */
 public function execute()
 {
     // call parent, this will probably add some general CSS/JS or other required files
     parent::execute();
     // fetch group ID
     $this->groupId = $this->getParameter('group_id', 'int');
     // load the form
     $this->loadForm();
     // validate the form
     $this->validateForm();
     // parse
     $this->parse();
     // display the page
     $this->display();
 }
Example #12
0
 /**
  * Execute the action
  *
  * @return	void
  */
 public function execute()
 {
     // call parent, this will probably add some general CSS/JS or other required files
     parent::execute();
     // the user email and key provided match
     if (!$this->isUserAllowed()) {
         $this->redirect(BackendModel::createURLForAction('index'));
     }
     // load form
     $this->loadForm();
     // validate the form
     $this->validateForm();
     // parse the error
     $this->parse();
     // display the page
     $this->display();
 }
Example #13
0
 /**
  * Execute the action.
  */
 public function execute()
 {
     // call parent, this will probably add some general CSS/JS or other required files
     parent::execute();
     // zip extension is required for module upload
     if (!extension_loaded('zlib')) {
         $this->tpl->assign('zlibIsMissing', true);
     }
     // ZipArchive class is required for module upload
     if (!class_exists('ZipArchive')) {
         $this->tpl->assign('ZipArchiveIsMissing', true);
     } elseif (!$this->isWritable()) {
         $this->tpl->assign('notWritable', true);
     } else {
         $this->loadForm();
         $this->validateForm();
         $this->parse();
     }
     // display the page
     $this->display();
 }
Example #14
0
 /**
  * Execute the action
  *
  * @return	void
  */
 public function execute()
 {
     // call parent, this will probably add some general CSS/JS or other required files
     parent::execute();
     // add js
     $this->header->addJS('jstree/jquery.tree.js');
     $this->header->addJS('jstree/lib/jquery.cookie.js');
     $this->header->addJS('jstree/plugins/jquery.tree.cookie.js');
     // add css
     $this->header->addCSS('/backend/modules/pages/js/jstree/themes/fork/style.css', null, true);
     // get the templates
     $this->templates = BackendPagesModel::getTemplates();
     // init var
     $defaultTemplateId = BackendModel::getModuleSetting($this->getModule(), 'default_template', false);
     // fallback
     if ($defaultTemplateId === false) {
         // get first key
         $keys = array_keys($this->templates);
         // set the first items as default if no template was set as default.
         $defaultTemplateId = $this->templates[$keys[0]]['id'];
     }
     // set the default template as checked
     $this->templates[$defaultTemplateId]['checked'] = true;
     // get the extras
     $this->extras = BackendPagesModel::getExtras();
     // get maximum number of blocks
     $maxNumBlocks = BackendModel::getModuleSetting($this->getModule(), 'template_max_blocks', 5);
     // build blocks array
     for ($i = 0; $i < $maxNumBlocks; $i++) {
         $this->blocks[$i] = array('index' => $i, 'name' => 'name ' . $i);
     }
     // load the form
     $this->loadForm();
     // validate the form
     $this->validateForm();
     // parse
     $this->parse();
     // display the page
     $this->display();
 }