} asort($template_select); $xtpl->assign("REPORT_SELECTION_HEADER", get_form_header($mod_strings["LBL_ONDEMAND_REPORT_SELECTION"], "", false)); $xtpl->assign("TEMPLATE_SELECTION", get_select_options_with_id($template_select, $focus->id)); $xtpl->parse("report_selection"); $report_selection = $xtpl->text("report_selection"); if (!empty($focus->id)) { $xtpl->assign("FORMAT_SELECTION_HEADER", get_form_header($mod_strings["LBL_ONDEMAND_FORMAT_SELECTION"], "", false)); $xtpl->assign("FORMAT_SELECTION", $focus->get_format_selection()); $xtpl->assign("FORMAT_PARAMETERS", $focus->get_format_parameters()); $xtpl->parse("format_selection"); $format_selection = $xtpl->text("format_selection"); } if (!empty($focus->id)) { if ($focus->report_result_type == "FILE") { $types = parse_list_modules($app_list_strings['record_type_display']); $types = array_merge(array("" => ""), $types); asort($types); $xtpl->assign("TYPE_OPTIONS", get_select_options_with_id($types, $_REQUEST['parent_module'])); //$change_parent_button = "<input title='".$app_strings['LBL_CHANGE_BUTTON_TITLE']."' type='button' class='button' value='".$app_strings['LBL_CHANGE_BUTTON_LABEL']."' name='parent_button' onclick='return window.open(\"index.php?module=\"+ document.EditView.parent_module.value + \"&action=Popup&html=Popup_picker&form=TasksEditView\",\"test\",\"width=600,height=400,resizable=1,scrollbars=1\");'>"; //$xtpl->assign("CHANGE_PARENT_BUTTON", $change_parent_button); $popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'EditView', 'field_to_name_array' => array('id' => 'parent_id', 'name' => 'parent_name')); $json = new JSON(JSON_LOOSE_TYPE); $encoded_popup_request_data = $json->encode($popup_request_data); $xtpl->assign('encoded_popup_request_data', $encoded_popup_request_data); $xtpl->assign("ATTACH_SELECTION_HEADER", get_form_header($mod_strings["LBL_ONDEMAND_ATTACH_SELECTION"], "", false)); $xtpl->assign("PARENT_ID", $_REQUEST['parent_id']); $xtpl->assign("PARENT_NAME", $_REQUEST['parent_name']); $cat_options = ReportContainer::get_category_select_options(); asort($cat_options); $xtpl->assign("CAT_OPTIONS", get_select_options_with_id($cat_options, $_REQUEST['parent_category']));
} if (empty($focus->assigned_name) && empty($focus->id)) { $focus->assigned_user_name = $current_user->user_name; } $xtpl->assign("ASSIGNED_USER_OPTIONS", get_select_options_with_id(get_user_array(TRUE, "Active", $focus->assigned_user_id), $focus->assigned_user_id)); $xtpl->assign("ASSIGNED_USER_NAME", $focus->assigned_user_name); $xtpl->assign("ASSIGNED_USER_ID", $focus->assigned_user_id); $xtpl->assign("PRIORITY_OPTIONS", get_select_options_with_id($app_list_strings['task_priority_dom'], $focus->priority)); // we have a hack where Contact has its own select box - Contacts needs to be in that // app_list_strings array for Emails - so hack the hack, and pull Contacts out. foreach ($app_list_strings['record_type_display'] as $k => $v) { if ($k != 'Contacts') { $recordTypeDisplay[$k] = $v; } } $xtpl->assign("TYPE_OPTIONS", get_select_options_with_id(parse_list_modules($recordTypeDisplay, false), $focus->parent_type)); $xtpl->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['task_status_dom'], $focus->status)); global $current_user; if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) { $record = ''; if (!empty($_REQUEST['record'])) { $record = $_REQUEST['record']; } $xtpl->assign("ADMIN_EDIT", "<a href='index.php?action=index&module=DynamicLayout&from_action=" . $_REQUEST['action'] . "&from_module=" . $_REQUEST['module'] . "&record=" . $record . "'>" . get_image($image_path . "EditLayout", "border='0' alt='Edit Layout' align='bottom'") . "</a>"); } //Add Custom Fields require_once 'modules/DynamicFields/templates/Files/EditView.php'; /////////////////////////////////////////////////////////////////////////////// //// INBOUND EMAIL HANDLING /////////////////////////////////////////////////////////////////////////////// if (isset($_REQUEST['inbound_email_id'])) {