예제 #1
0
 /**
  * @see SugarView::preDisplay()
  *
  * Override preDisplay to check for presence of 'status' in $_REQUEST
  * This is to support the "Close And Create New" operation.
  */
 public function preDisplay()
 {
     if (!empty($_REQUEST['status']) && $_REQUEST['status'] == 'Held') {
         $this->bean->status = 'Held';
     }
     parent::preDisplay();
 }
예제 #2
0
 public function preDisplay()
 {
     global $current_user;
     parent::preDisplay();
     $this->bean->author = $current_user->name;
     $this->bean->user_id_c = $current_user->id;
 }
예제 #3
0
 public function preDisplay()
 {
     global $app_list_strings;
     echo "<style type='text/css'>";
     //readfile('modules/AOR_Reports/css/edit.css');
     readfile('modules/AOR_Reports/js/jqtree/jqtree.css');
     echo "</style>";
     if (!is_file('cache/jsLanguage/AOR_Fields/' . $GLOBALS['current_language'] . '.js')) {
         require_once 'include/language/jsLanguage.php';
         jsLanguage::createModuleStringsCache('AOR_Fields', $GLOBALS['current_language']);
     }
     echo '<script src="cache/jsLanguage/AOR_Fields/' . $GLOBALS['current_language'] . '.js"></script>';
     if (!is_file('cache/jsLanguage/AOR_Conditions/' . $GLOBALS['current_language'] . '.js')) {
         require_once 'include/language/jsLanguage.php';
         jsLanguage::createModuleStringsCache('AOR_Conditions', $GLOBALS['current_language']);
     }
     echo '<script src="cache/jsLanguage/AOR_Conditions/' . $GLOBALS['current_language'] . '.js"></script>';
     echo '<script src="include/javascript/yui3/build/yui/yui-min.js"></script>';
     echo "<script>";
     echo "sort_by_values = \"" . trim(preg_replace('/\\s+/', ' ', get_select_options_with_id($app_list_strings['aor_sort_operator'], ''))) . "\";";
     echo "total_values = \"" . trim(preg_replace('/\\s+/', ' ', get_select_options_with_id($app_list_strings['aor_total_options'], ''))) . "\";";
     echo "format_values = \"" . trim(preg_replace('/\\s+/', ' ', get_select_options_with_id($app_list_strings['aor_format_options'], ''))) . "\";";
     echo "</script>";
     $fields = $this->getFieldLines();
     echo "<script>var fieldLines = " . json_encode($fields) . "</script>";
     $conditions = $this->getConditionLines();
     echo "<script>var conditionLines = " . json_encode($conditions) . "</script>";
     $charts = $this->getChartLines();
     echo "<script>var chartLines = " . json_encode($charts) . ";</script>";
     parent::preDisplay();
 }
예제 #4
0
 function preDisplay()
 {
     if (file_exists("cache/modules/OfficeReportsVariables/EditView.tpl")) {
         unlink("cache/modules/OfficeReportsVariables/EditView.tpl");
     }
     parent::preDisplay();
 }
예제 #5
0
 /**
  * @see SugarView::preDisplay()
  */
 public function preDisplay()
 {
     if ($_REQUEST['module'] != 'Calls' && isset($_REQUEST['status']) && empty($_REQUEST['status'])) {
         $this->bean->status = '';
     }
     //if
     if (!empty($_REQUEST['status']) && $_REQUEST['status'] == 'Held') {
         $this->bean->status = 'Held';
     }
     parent::preDisplay();
 }
예제 #6
0
 /**
  * preDisplay
  * Override preDisplay to check for presence of 'status' in $_REQUEST
  * This is to support the "Close And Create New" operation.
  */
 function preDisplay()
 {
     if (isset($_REQUEST['status']) && empty($_REQUEST['status'])) {
         $this->bean->status = '';
     }
     //if
     if (!empty($_REQUEST['status']) && $_REQUEST['status'] == 'Held') {
         $this->bean->status = 'Held';
     }
     parent::preDisplay();
 }
예제 #7
0
 /**
  * preDisplay
  * Override preDisplay to check for presence of 'status' in $_REQUEST
  * This is to support the "Close And Create New" operation.
  */
 function preDisplay()
 {
     if ($_REQUEST['module'] != 'Tasks' && isset($_REQUEST['status']) && empty($_REQUEST['status'])) {
         $this->bean->status = '';
     }
     //if
     if (!empty($_REQUEST['status']) && $_REQUEST['status'] == 'Completed') {
         $this->bean->status = 'Completed';
     }
     parent::preDisplay();
 }
예제 #8
0
 public function testdisplay()
 {
     //execute the method with essential parameters set. it should return some html.
     $view = new ViewEdit();
     $view->module = 'Users';
     $view->bean = new User();
     $view->preDisplay();
     $view->ev->ss = new Sugar_Smarty();
     ob_start();
     $view->display();
     $renderedContent = ob_get_contents();
     ob_end_clean();
     $this->assertGreaterThan(0, strlen($renderedContent));
 }
예제 #9
0
    public function preDisplay(){

        if ($GLOBALS['current_user']->employee_duty_c == "106")
        {
            $this->bean->jrmis_departments_id_c = $GLOBALS['current_user']->jrmis_departments_id_c;
            $GLOBALS['log']->debug("employee.edit.view.preDisplay, 
            bean.jrmis_departments_id_c:" . $this->bean->jrmis_departments_id_c);
            $GLOBALS['log']->debug("employee.edit.view.preDisplay, 
            bean: " . print_r($this->bean, TRUE));
        }

        parent::preDisplay();

    }
예제 #10
0
 function preDisplay()
 {
     $this->fieldHelper = UserViewHelper::create($this->ss, $this->bean, 'EditView');
     $this->fieldHelper->setupAdditionalFields();
     parent::preDisplay();
 }
예제 #11
0
 public function preDisplay()
 {
     parent::preDisplay();
 }