public function display() { require_once "modules/Calendar/CalendarUtils.php"; $module = $this->view_object_map['currentModule']; $_REQUEST['module'] = $module; $base = 'modules/' . $module . '/metadata/'; $source = SugarAutoLoader::existingCustomOne($base . 'editviewdefs.php', $base . 'quickcreatedefs.php'); $GLOBALS['mod_strings'] = return_module_language($GLOBALS['current_language'], $module); $tpl = SugarAutoLoader::existingCustomOne('include/EditView/EditView.tpl'); $this->ev = new EditView(); $this->ev->view = "QuickCreate"; $this->ev->ss = new Sugar_Smarty(); $this->ev->formName = "CalendarEditView"; $this->ev->setup($module, $this->bean, $source, $tpl); $this->ev->defs['templateMeta']['form']['headerTpl'] = "modules/Calendar/tpls/editHeader.tpl"; $this->ev->defs['templateMeta']['form']['footerTpl'] = "modules/Calendar/tpls/empty.tpl"; $this->ev->process(false, "CalendarEditView"); if (!empty($this->bean->id)) { require_once 'include/json_config.php'; $jsonConfig = new json_config(); $grJavascript = $jsonConfig->getFocusData($module, $this->bean->id); } else { $grJavascript = ""; } $jsonArr = array('access' => 'yes', 'module_name' => $this->bean->module_dir, 'record' => $this->bean->id, 'edit' => $this->editable, 'html' => $this->ev->display(false, true), 'gr' => $grJavascript, 'acl' => array('delete' => $this->bean->aclAccess('delete'))); if (!empty($this->view_object_map['repeatData'])) { $jsonArr = array_merge($jsonArr, array("repeat" => $this->view_object_map['repeatData'])); } ob_clean(); echo json_encode($jsonArr); }
function display(){ error_reporting(0); require_once('include/json_config.php'); global $json; $json = getJSONobj(); $json_config = new json_config(); $GRjavascript = $json_config->getFocusData($_REQUEST['type'], $_REQUEST['record']); ob_clean(); echo $GRjavascript; }
public function display() { require_once "modules/Calendar/CalendarUtils.php"; $module = $this->view_object_map['currentModule']; $_REQUEST['module'] = $module; $base = 'modules/' . $module . '/metadata/'; $source = 'custom/' . $base . 'quickcreatedefs.php'; if (!file_exists($source)) { $source = $base . 'quickcreatedefs.php'; if (!file_exists($source)) { $source = 'custom/' . $base . 'editviewdefs.php'; if (!file_exists($source)) { $source = $base . 'editviewdefs.php'; } } } $GLOBALS['mod_strings'] = return_module_language($GLOBALS['current_language'], $module); $tpl = $this->getCustomFilePathIfExists('include/EditView/EditView.tpl'); $this->ev = new EditView(); $this->ev->view = "QuickCreate"; $this->ev->ss = new Sugar_Smarty(); $this->ev->formName = "CalendarEditView"; $this->ev->setup($module, $this->bean, $source, $tpl); $this->ev->defs['templateMeta']['form']['headerTpl'] = "modules/Calendar/tpls/editHeader.tpl"; $this->ev->defs['templateMeta']['form']['footerTpl'] = "modules/Calendar/tpls/empty.tpl"; $this->ev->process(false, "CalendarEditView"); if (!empty($this->bean->id)) { require_once 'include/json_config.php'; global $json; $json = getJSONobj(); $json_config = new json_config(); $GRjavascript = $json_config->getFocusData($module, $this->bean->id); } else { $GRjavascript = ""; } $json_arr = array('access' => 'yes', 'module_name' => $this->bean->module_dir, 'record' => $this->bean->id, 'edit' => $this->editable, 'html' => $this->ev->display(false, true), 'gr' => $GRjavascript); if ($repeat_arr = CalendarUtils::get_sendback_repeat_data($this->bean)) { $json_arr = array_merge($json_arr, array("repeat" => $repeat_arr)); } ob_clean(); echo json_encode($json_arr); }
<?php if (!defined('sugarEntry') || !sugarEntry) { die('Not A Valid Entry Point'); } error_reporting(0); require_once 'include/json_config.php'; global $json; $json = getJSONobj(); $json_config = new json_config(); $GRjavascript = $json_config->getFocusData($_REQUEST['type'], $_REQUEST['record']); ob_clean(); echo $GRjavascript;
public function display() { require_once "modules/Calendar/CalendarUtils.php"; $module = $_REQUEST['current_module']; $_REQUEST['module'] = $module; $base = 'modules/' . $module . '/metadata/'; $source = 'custom/' . $base . 'quickcreatedefs.php'; if (!file_exists($source)) { $source = $base . 'quickcreatedefs.php'; if (!file_exists($source)) { $source = 'custom/' . $base . 'editviewdefs.php'; if (!file_exists($source)) { $source = $base . 'editviewdefs.php'; } } } $tpl = "custom/include/EditView/EditView.tpl"; if (!file_exists($tpl)) { $tpl = "include/EditView/EditView.tpl"; } $this->ev = new EditView(); $this->ev->view = "QuickCreate"; $this->ev->ss = new Sugar_Smarty(); $this->ev->formName = "CalendarEditView"; $this->ev->setup($module, $this->bean, $source, $tpl); $this->ev->defs['templateMeta']['form']['headerTpl'] = "modules/Calendar/tpls/empty.tpl"; $this->ev->defs['templateMeta']['form']['footerTpl'] = "modules/Calendar/tpls/empty.tpl"; $this->ev->process(false, "CalendarEditView"); if (!empty($this->bean->id)) { require_once 'include/json_config.php'; global $json; $json = getJSONobj(); $json_config = new json_config(); $GRjavascript = $json_config->getFocusData($module, $this->bean->id); } else { $GRjavascript = ""; } $json_arr = array('success' => 'yes', 'module_name' => $this->bean->module_dir, 'record' => $this->bean->id, 'edit' => $this->editable, 'html' => $this->ev->display(false, true), 'gr' => $GRjavascript); ob_clean(); echo json_encode($json_arr); }