Ejemplo n.º 1
0
 public function actionItemDefaults()
 {
     if ($this->validatePermission('smartslider_config')) {
         if (N2Request::getInt('save')) {
             if ($this->validateToken()) {
                 $settingsModel = new N2SmartsliderSettingsModel();
                 if ($settingsModel->saveDefaults(N2Request::getVar('defaults', array()))) {
                     $this->refresh();
                 }
             } else {
                 $this->refresh();
             }
         }
         $this->addView("../../inline/_sidebar_settings", array(), "sidebar");
         $this->addView("defaults");
         $this->render();
     }
 }
Ejemplo n.º 2
0
 private function _renderForm()
 {
     $settingsModel = new N2SmartsliderSettingsModel();
     $settingsModel->form($this->viewName);
     echo '<input name="namespace" value="' . $this->viewName . '" type="hidden" />';
 }