コード例 #1
0
ファイル: topic_edit.php プロジェクト: a2call/commsy
            $session->unsetValue('linked_items_post_vars');
            cleanup_session($current_iid);
            $params = array();
            $params['iid'] = $topic_item->getItemID();
            redirect($environment->getCurrentContextID(),
                     CS_TOPIC_TYPE, 'detail', $params);
         }
      }

      // Display form
      $class_params = array();
      $class_params['environment'] = $environment;
      $class_params['with_modifying_actions'] = true;
      $form_view = $class_factory->getClass(FORM_VIEW,$class_params);
      unset($class_params);
      if (!mayEditRegular($current_user, $topic_item)) {
         $form_view->warnChanger();
         $params = array();
         $params['environment'] = $environment;
         $params['with_modifying_actions'] = true;
         $params['width'] = 500;
         $errorbox = $class_factory->getClass(ERRORBOX_VIEW,$params);
         unset($params);
         $errorbox->setText($translator->getMessage('COMMON_EDIT_AS_MODERATOR'));
         $page->add($errorbox);
      }
      $form_view->setAction(curl($environment->getCurrentContextID(),CS_TOPIC_TYPE,'edit',''));
      $form_view->setForm($form);
      $page->add($form_view);
   }
}
コード例 #2
0
ファイル: annotation_edit.php プロジェクト: a2call/commsy
            $form->prepareForm();
            $form->loadValues();
            $form->check();
         }
      }

      // Display form
      $params = array();
      $params['environment'] = $environment;
      $params['with_modifying_actions'] = true;
      $form_view = $class_factory->getClass(FORM_VIEW,$params);
      unset($params);
      if ($with_anchor){
         $form_view->withAnchor();
      }
      if (!mayEditRegular($current_user, $annotation_item)) {
         $form_view->warnChanger();
         $params = array();
         $params['environment'] = $environment;
         $params['with_modifying_actions'] = true;
         $params['width'] = 500;
         $errorbox = $class_factory->getClass(ERRORBOX_VIEW,$params);
         unset($params);
         $errorbox->setText($translator->getMessage('COMMON_EDIT_AS_MODERATOR'));
         $page->add($errorbox);
      }
      $form_view->setAction(curl($environment->getCurrentContextID(),'annotation','edit',''));
      $form_view->setForm($form);
      $form_view->setRubricConnections($rubric_connection);
      $page->add($form_view);
   }
コード例 #3
0
ファイル: group_edit.php プロジェクト: a2call/commsy
            $session->unsetValue('linked_items_post_vars');
            cleanup_session($current_iid);
            $params = array();
            $params['iid'] = $group_item->getItemID();
            redirect($environment->getCurrentContextID(),
                     'group', 'detail', $params);
         }
      }

      // Display form
      $class_params = array();
      $class_params['environment'] = $environment;
      $class_params['with_modifying_actions'] = true;
      $form_view = $class_factory->getClass(FORM_VIEW,$class_params);
      unset($class_params);
      if (!mayEditRegular($current_user, $group_item) and !$group_item->isSystemLabel()) {
         $form_view->warnChanger();
         $params = array();
         $params['environment'] = $environment;
         $params['with_modifying_actions'] = true;
         $params['width'] = 500;
         $errorbox = $class_factory->getClass(ERRORBOX_VIEW,$params);
         unset($params);
         $errorbox->setText($translator->getMessage('COMMON_EDIT_AS_MODERATOR'));
         $page->add($errorbox);
      }
      $form_view->setAction(curl($environment->getCurrentContextID(),'group','edit',''));
      $form_view->setForm($form);
      $page->add($form_view);
   }
}
コード例 #4
0
ファイル: section_edit.php プロジェクト: a2call/commsy
               $params['autoVersion'] = 'true';
            }
            redirect($environment->getCurrentContextID(), 'material', 'detail', $params,'anchor'.$section_item->getItemID());
         }
      }

      // display form
      $class_params = array();
      $class_params['environment'] = $environment;
      $class_params['with_modifying_actions'] = true;
      $form_view = $class_factory->getClass(FORM_VIEW,$class_params);
      unset($class_params);
      if ($with_anchor){
         $form_view->withAnchor();
      }
      if (!mayEditRegular($current_user, $material_item)) {
         $form_view->warnChanger();
         $params = array();
         $params['environment'] = $environment;
         $params['with_modifying_actions'] = true;
         $params['width'] = 500;
         $errorbox = $class_factory->getClass(ERRORBOX_VIEW,$params);
         unset($params);
         $errorbox->setText($translator->getMessage('COMMON_EDIT_AS_MODERATOR'));
         $page->add($errorbox);
      }
      $form_view->setAction(curl($environment->getCurrentContextID(),'section','edit',''));
      $form_view->setForm($form);
      $page->add($form_view);
   }
}
コード例 #5
0
ファイル: date_edit.php プロジェクト: a2call/commsy
      // display form
      $params = array();
      $params['environment'] = $environment;
      $params['with_modifying_actions'] = true;
      $form_view = $class_factory->getClass(FORM_VIEW,$params);
      unset($params);
      if ($with_anchor){
        $form_view->withAnchor();
      }
      if (isset($focus_element_onload)) {
         $form_view->setFocusElementOnLoad($focus_element_onload);
      }
      if (isset($focus_element_anchor)) {
         $form_view->setFocusElementAnchor($focus_element_anchor);
      }
      if (!mayEditRegular($current_user, $dates_item)) {
         $form_view->warnChanger();
         $params = array();
         $params['environment'] = $environment;
         $params['with_modifying_actions'] = true;
         $params['width'] = 500;
         $errorbox = $class_factory->getClass(ERRORBOX_VIEW,$params);
         unset($params);
         $errorbox->setText($translator->getMessage('COMMON_EDIT_AS_MODERATOR'));
         $page->add($errorbox);
      }
      $form_view->setAction(curl($environment->getCurrentContextID(),CS_DATE_TYPE,'edit',''));
      $form_view->setForm($form);
      $page->add($form_view);
   }
}
コード例 #6
0
ファイル: institution_edit.php プロジェクト: a2call/commsy
            $session->unsetValue('linked_items_post_vars');
            cleanup_session($current_iid);
            $params = array();
            $params['iid'] = $institution_item->getItemID();
            redirect($environment->getCurrentContextID(),
                     'institution', 'detail', $params);
         }
      }

      // Display form
      $class_params = array();
      $class_params['environment'] = $environment;
      $class_params['with_modifying_actions'] = true;
      $form_view = $class_factory->getClass(FORM_VIEW,$class_params);
      unset($class_params);
      if (!mayEditRegular($current_user, $institution_item)) {
         $form_view->warnChanger();
         $params = array();
         $params['environment'] = $environment;
         $params['with_modifying_actions'] = true;
         $params['width'] = 500;
         $errorbox = $class_factory->getClass(ERRORBOX_VIEW,$params);
         unset($params);
         $errorbox->setText($translator->getMessage('COMMON_EDIT_AS_MODERATOR'));
         $page->add($errorbox);
      }
      $form_view->setAction(curl($environment->getCurrentContextID(),'institution','edit',''));
      $form_view->setForm($form);
      $page->add($form_view);
   }
}
コード例 #7
0
ファイル: discarticle_edit.php プロジェクト: a2call/commsy
         }
      }

      // Display form
      $class_params = array();
      $class_params['environment'] = $environment;
      $class_params['with_modifying_actions'] = true;
      $form_view = $class_factory->getClass(FORM_VIEW,$class_params);
      unset($class_params);
      if ($with_anchor){
        $form_view->withAnchor();
     }
      $discussion_manager = $environment->getDiscussionManager();
      if ( isset($discarticle_item) ){
         $discussion_item = $discussion_manager->getItem($discarticle_item->getDiscussionID());
         if (!mayEditRegular($current_user, $discarticle_item)) {
            $form_view->warnChanger();
            $params = array();
            $params['environment'] = $environment;
            $params['with_modifying_actions'] = true;
            $params['width'] = 500;
            $errorbox = $class_factory->getClass(ERRORBOX_VIEW,$params);
            unset($params);
            $errorbox->setText($translator->getMessage('COMMON_EDIT_AS_MODERATOR'));
            $page->add($errorbox);
         }
      }
      $form_view->setAction(curl($environment->getCurrentContextID(),'discarticle','edit',''));
      $form_view->setForm($form);
      $page->add($form_view);
   }
コード例 #8
0
ファイル: announcement_edit.php プロジェクト: a2call/commsy
         }
      }

      // Display form
      $params = array();
      $params['environment'] = $environment;
      $params['with_modifying_actions'] = true;
      $form_view = $class_factory->getClass(FORM_VIEW,$params);
      unset($params);
      $room_item = $environment->getCurrentContextItem();

      if ($with_anchor){
        $form_view->withAnchor();
     }
      if (!mayEditRegular($current_user, $announcement_item)) {
         $form_view->warnChanger();
         $class_params = array();
         $class_params['environment'] = $environment;
         $class_params['with_modifying_actions'] = true;
         $class_params['width'] = 500;
         $errorbox = $class_factory->getClass(ERRORBOX_VIEW,$class_params);
         unset($class_params);
         $errorbox->setText($translator->getMessage('COMMON_EDIT_AS_MODERATOR'));
         $page->add($errorbox);
      }
      $params['iid'] = $current_iid;
      $form_view->setAction(curl($environment->getCurrentContextID(),CS_ANNOUNCEMENT_TYPE,'edit',$params));
      $form_view->setForm($form);
      $page->add($form_view);
   }