if (isset($_REQUEST['parent_name']) && is_null($focus->parent_name)) { $focus->parent_name = vtlib_purify($_REQUEST['parent_name']); } if (isset($_REQUEST['parent_id'])) { $focus->parent_id = vtlib_purify($_REQUEST['parent_id']); } if (isset($_REQUEST['parent_type'])) { $focus->parent_type = vtlib_purify($_REQUEST['parent_type']); } elseif (!isset($focus->parent_type)) { $focus->parent_type = $app_list_strings['record_type_default_key']; } $disp_view = getView($focus->mode); $smarty->assign('BLOCKS', getBlocks($currentModule, $disp_view, $focus->mode, $focus->column_fields)); $smarty->assign('BASBLOCKS', getBlocks($currentModule, $disp_view, $focus->mode, $focus->column_fields, 'BAS')); $smarty->assign('ADVBLOCKS', getBlocks($currentModule, $disp_view, $focus->mode, $focus->column_fields, 'ADV')); $custom_blocks = getCustomBlocks($currentModule, $disp_view); $smarty->assign('CUSTOMBLOCKS', $custom_blocks); $smarty->assign('FIELDS', $focus->column_fields); $smarty->assign('OP_MODE', $disp_view); $smarty->assign('APP', $app_strings); $smarty->assign('MOD', $mod_strings); $smarty->assign('MODULE', $currentModule); // TODO: Update Single Module Instance name here. $smarty->assign('SINGLE_MOD', 'SINGLE_' . $currentModule); $smarty->assign('CATEGORY', $category); $smarty->assign("THEME", $theme); $smarty->assign('IMAGE_PATH', "themes/{$theme}/images/"); $smarty->assign('ID', $focus->id); $smarty->assign('MODE', $focus->mode); $smarty->assign('CREATEMODE', isset($_REQUEST['createmode']) ? vtlib_purify($_REQUEST['createmode']) : ''); $smarty->assign('CHECK', Button_Check($currentModule));
global $mod_strings, $app_strings, $app_list_strings, $theme, $adb; $theme_path = "themes/" . $theme . "/"; $image_path = $theme_path . "images/"; require_once 'include/utils/CommonUtils.php'; $tabid = $_REQUEST['tabid']; $fieldid = $_REQUEST['fieldid']; $fieldlabel = $_REQUEST['fieldlabel']; $order = $_REQUEST['order']; $blockid = $_REQUEST['blockid']; $blocklabel = $_REQUEST['blocklabel']; $typeofdata = $_REQUEST['typeofdata']; $fieldmandatory = ""; if ($typeofdata == "true") { $fieldmandatory = "checked"; } $blockArr = getCustomBlocks($_REQUEST['fld_module'], $tabid); //print_r($blockArr); $output .= ' <div id="layoutLayer" > <form action="index.php" method="post" name="addtodb" onSubmit="return validate_layout()"> <input type="hidden" name="module" value="Settings"> <input type="hidden" name="fld_module" value="' . $_REQUEST['fld_module'] . '"> <input type="hidden" name="parenttab" value="Settings"> <input type="hidden" name="action" value="AddCustomLayoutToDB"> <input type="hidden" name="blockid" value="' . $blockid . '"> <input type="hidden" name="fieldid" value="' . $fieldid . '"> <input type="hidden" name="mode" value="' . $mode . '"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>'; if ($mode == 'edit') { $output .= '<h3 id="myModalLabel">' . $mod_strings['LBL_EDIT_LAYOUT'] . '</h3>'; } else {
$smarty->assign('IS_REL_LIST', isPresentRelatedLists($currentModule)); $smarty->assign('SinglePane_View', $singlepane_view); if ($singlepane_view == 'true') { $related_array = getRelatedLists($currentModule, $focus); $smarty->assign("RELATEDLISTS", $related_array); require_once 'include/ListView/RelatedListViewSession.php'; if (!empty($_REQUEST['selected_header']) && !empty($_REQUEST['relation_id'])) { RelatedListViewSession::addRelatedModuleToSession(vtlib_purify($_REQUEST['relation_id']), vtlib_purify($_REQUEST['selected_header'])); } $open_related_modules = RelatedListViewSession::getRelatedModulesFromSession(); $smarty->assign("SELECTEDHEADERS", $open_related_modules); } if (isPermitted($currentModule, 'CreateView', $record) == 'yes') { $smarty->assign('CREATE_PERMISSION', 'permitted'); } if (isPermitted($currentModule, 'Delete', $record) == 'yes') { $smarty->assign('DELETE', 'permitted'); } $blocks = getBlocks($currentModule, 'detail_view', '', $focus->column_fields); $custom_blocks = getCustomBlocks($currentModule, 'detail_view'); $smarty->assign('BLOCKS', $blocks); $smarty->assign('CUSTOMBLOCKS', $custom_blocks); $smarty->assign('FIELDS', $focus->column_fields); // Gather the custom link information to display include_once 'vtlib/Vtiger/Link.php'; $customlink_params = array('MODULE' => $currentModule, 'RECORD' => $focus->id, 'ACTION' => vtlib_purify($_REQUEST['action'])); $smarty->assign('CUSTOM_LINKS', Vtiger_Link::getAllByType(getTabid($currentModule), array('DETAILVIEWBASIC', 'DETAILVIEW', 'DETAILVIEWWIDGET'), $customlink_params)); // Record Change Notification $focus->markAsViewed($current_user->id); $smarty->assign('DETAILVIEW_AJAX_EDIT', PerformancePrefs::getBoolean('DETAILVIEW_AJAX_EDIT', true)); $smarty->display('DetailView.tpl');