Beispiel #1
0
// [ML] not clean hack, fix "delete" option
if (!empty($_SESSION['errors'])) {
    if ($_SESSION['form_data']['hidden']) {
        $_SESSION['form_data']['hidden'] = 'Y';
    }
}
if (_session('id_app', 0) > 0) {
    lcm_page_start(_T('title_app_edit'), '', '', 'tools_agenda');
} else {
    lcm_page_start(_T('title_app_new'), '', '', 'tools_agenda');
}
if (_session('id_case', 0) > 0) {
    // Show a bit of background on the case
    show_context_start();
    show_context_case_title(_session('id_case'));
    show_context_case_involving(_session('id_case'));
    show_context_end();
}
// Show the errors (if any)
echo show_all_errors();
// Disable inputs when edit is not allowed for the field
$ac = get_ac_app($app, _session('id_case'));
$admin = $ac['a'];
$write = $ac['w'];
$edit = $ac['e'];
$dis = $edit ? '' : 'disabled="disabled"';
?>

<form action="upd_app.php" method="post">
	<table class="tbl_usr_dtl" width="99%">
Beispiel #2
0
if (isset($_SESSION['followup'])) {
    lcm_page_start(_T('title_fu_edit'), '', '', 'cases_followups');
} else {
    if (isset($_REQUEST['type'])) {
        if ($_REQUEST['type'] == 'stage_change') {
            lcm_page_start(_T('title_fu_change_stage'), '', '', 'cases_intro#stage');
        } else {
            lcm_page_start(_T('title_fu_change_status'), '', '', 'cases_intro#status');
        }
    } else {
        lcm_page_start(_T('title_fu_new'), '', '', 'cases_followups');
    }
}
show_context_start();
show_context_case_title($case, 'followups');
show_context_case_involving($case);
// For 'change status' // FIXME (for edit existing fu?)
if ($_REQUEST['submit'] == 'set_status') {
    show_context_item(_Ti('fu_input_current_status') . _T('case_status_option_' . $row['status']));
}
// For 'change stage'
if (isset($old_stage) && $old_stage) {
    show_context_item(_Ti('fu_input_current_stage') . _Tkw('stage', $old_stage));
}
// Show stage information [ML] Not very efficient, I know, but I prefer to avoid spagetti
if ($_SESSION['form_data']['case_stage']) {
    // if editing an existing followup..
    $stage_info = get_kw_from_name('stage', $_SESSION['form_data']['case_stage']);
    $id_stage = $stage_info['id_keyword'];
    show_context_stage($case, $id_stage);
} elseif (isset($old_stage) && $old_stage) {
Beispiel #3
0
    }
} else {
    die("Which follow-up?");
}
// For 'edit case' button + 'undelete' message
$case_allow_modif = read_meta('case_allow_modif');
$edit = allowed($fu_data['id_case'], 'e');
$admin = allowed($fu_data['id_case'], 'a');
lcm_page_start(_T('title_fu_view'), '', '', 'cases_followups');
echo '<fieldset class="info_box">';
// Show a bit of background on the case
$case = $fu_data['id_case'];
show_context_start();
show_context_case_title($fu_data['id_case']);
show_context_case_stage($fu_data['id_case'], $fu_data['id_followup']);
show_context_case_involving($fu_data['id_case']);
// Show parent appointment, if any
// [ML] todo put in inc_presentation
$q = "SELECT app.*\n\t\tFROM lcm_app_fu as af, lcm_app as app\n\t\tWHERE af.id_followup = {$followup} \n\t\t  AND af.id_app = app.id_app \n\t\t  AND af.relation = 'child'";
$res_app = lcm_query($q);
if ($app = lcm_fetch_array($res_app)) {
    echo '<li style="list-style-type: none;">' . _T('fu_input_parent_appointment') . ' ';
    echo '<a class="content_link" href="app_det.php?app=' . $app['id_app'] . '">' . _Tkw('appointments', $app['type']) . ' (' . $app['title'] . ') from ' . format_date($app['start_time']) . "</a></li>\n";
    // TRAD
}
// Show child appointment, if any
$q = "SELECT app.* \n\t\tFROM lcm_app_fu as af, lcm_app as app\n\t\tWHERE af.id_followup = {$followup} \n\t\t  AND af.id_app = app.id_app \n\t\t  AND af.relation = 'parent'";
$res_app = lcm_query($q);
if ($app = lcm_fetch_array($res_app)) {
    echo '<li style="list-style-type: none;">' . _T('fu_input_child_appointment') . ' ';
    echo '<a class="content_link" href="app_det.php?app=' . $app['id_app'] . '">' . _Tkw('appointments', $app['type']) . ' (' . $app['title'] . ') from ' . format_date($app['start_time']) . "</a></li>\n";