Ejemplo n.º 1
0
 public function view($fID = 0)
 {
     if ($fID > 0) {
         $sessionFormID = $fID;
         Session::set('formifyFormID', $fID);
     } else {
         $sessionFormID = Session::get('formifyFormID');
     }
     $f = \Concrete\Package\Formify\Src\FormifyForm::get($sessionFormID);
     $this->set('f', $f);
     $userAttributes = UserKey::getList();
     $this->set('userAttributes', $userAttributes);
     $fsl = new FileSetList();
     $fsl->filterByType(FileSet::TYPE_PUBLIC);
     $fileSets = $fsl->getPage();
     $this->set('fileSets', $fileSets);
     if (!$f) {
         $this->redirect('/dashboard/formify/forms');
     }
     $html = Loader::helper('html');
     $this->addHeaderItem($html->css('formify.css', 'formify'));
     $this->addHeaderItem($html->css('fields.css', 'formify'));
     $this->addFooterItem($html->javascript('angular.min.js', 'formify'));
     $this->addFooterItem($html->javascript('ui-bootstrap-custom-tpls-0.13.0.min.js', 'formify'));
     $this->addFooterItem($html->javascript('formify.js', 'formify'));
     $this->addFooterItem($html->javascript('fields.js', 'formify'));
     $this->addFooterItem($html->javascript('controllers/fields.js', 'formify'));
 }
Ejemplo n.º 2
0
 public function view()
 {
     $fsl = new FileSetList();
     if (isset($_REQUEST['fsKeywords'])) {
         $fsl->filterByKeywords($_REQUEST['fsKeywords']);
     }
     if (isset($_REQUEST['fsType'])) {
         $fsl->filterByType($_REQUEST['fsType']);
         $this->set('fsType', $_REQUEST['fsType']);
     } else {
         $fsl->filterByType(FileSet::TYPE_PUBLIC);
         $this->set('fsType', FileSet::TYPE_PUBLIC);
     }
     $fileSets = $fsl->getPage();
     $this->set('fileSets', $fileSets);
     $this->set('fsl', $fsl);
 }