Beispiel #1
0
} elseif (isset($old_stage) && $old_stage) {
    // setting new stage
    $stage_info = get_kw_from_name('stage', $old_stage);
    $id_stage = $stage_info['id_keyword'];
    show_context_stage($case, $id_stage);
} else {
    // Normal follow-up
    $result = lcm_query("SELECT stage FROM lcm_case WHERE id_case = " . $case);
    $row = lcm_fetch_array($result);
    if ($row['stage']) {
        $stage_info = get_kw_from_name('stage', $row['stage']);
        $id_stage = $stage_info['id_keyword'];
        show_context_stage($case, $id_stage);
    }
}
show_context_end();
// Show the errors (if any)
echo show_all_errors($_SESSION['errors']);
// Disable inputs when edit is not allowed for the field
$dis = $admin || $edit ? '' : 'disabled="disabled"';
echo '<form action="upd_fu.php" method="post">' . "\n";
$obj_fu = new LcmFollowupInfoUI($_SESSION['follow']);
$obj_fu->printEdit();
echo '<button name="submit" type="submit" value="submit" class="simple_form_btn">' . _T('button_validate') . "</button>\n";
echo '<input type="hidden" name="id_followup" value="' . _session('id_followup') . '" />';
echo '<input type="hidden" name="id_case" value="' . _session('id_case') . '">';
echo '<input type="hidden" name="id_app" value="' . _session('id_app', 0) . '">';
echo '<input type="hidden" name="ref_edit_fu" value="' . _session('ref_edit_fu') . '">';
echo "</form>\n";
lcm_page_end();
// Clear the errors, in case user jumps to other 'edit' page
Beispiel #2
0
 function printEdit()
 {
     echo '<input type="hidden" name="id_case" value="' . $this->getDataInt('id_case') . '" />' . "\n";
     echo '<table width="99%" border="0" align="center" cellpadding="5" cellspacing="0" class="tbl_usr_dtl">' . "\n";
     // TODO:
     // Ajouter auteur, etc.
     // Ajouter "approved by" si id_admin != 0
     show_context_start();
     show_context_case_title($this->getDataInt('id_case'), 'exps');
     show_context_end();
     if ($this->getDataInt('id_expense')) {
         echo "<tr><td>" . _T('expense_input_id') . "</td>\n";
         echo "<td>" . $this->getDataInt('id_expense') . '<input type="hidden" name="id_expense" value="' . $this->getDataInt('id_expense') . '" /></td></tr>' . "\n";
     }
     echo '<tr><td>' . f_err_star('description') . _T('expense_input_description') . '</td>' . "\n";
     echo '<td><textarea name="description" id="input_expense_description" class="frm_tarea" rows="3" cols="60">' . clean_output($this->getDataString('description')) . "</textarea>\n" . "</td>\n";
     echo "</tr>\n";
     echo '<tr><td>' . f_err_star('type') . _T('expense_input_type') . '</td>' . "\n";
     echo '<td>';
     echo '<select ' . $dis . ' name="type" size="1" class="sel_frm">' . "\n";
     $default_exp = $this->getDataString('type', get_suggest_in_group_name('_exptypes'));
     $exptype_kws = get_keywords_in_group_name('_exptypes');
     foreach ($exptype_kws as $kw) {
         $sel = isSelected($kw['name'] == $default_exp);
         if ($sel) {
             $kw_found = true;
         }
         echo '<option value="' . $kw['name'] . '"' . $sel . '>' . _T(remove_number_prefix($kw['title'])) . "</option>\n";
     }
     echo '</td></tr>' . "\n";
     echo '<tr><td>' . f_err_star('cost') . _T('expense_input_cost') . '</td>' . "\n";
     echo '<td>';
     echo '<input type="text" name="cost" value="' . $this->getDataFloat('cost') . '" class="search_form_txt" size="10" />';
     echo ' ' . htmlspecialchars(read_meta('currency'));
     echo "</td></tr>\n";
     // Show comment box only if new expense (not edit)
     if (!$this->getDataInt('id_expense')) {
         echo "<tr>\n";
         echo "<td>" . f_err_star('comment') . _Ti('expense_input_comment') . "</td>\n";
         echo '<td><textarea name="comment" id="input_expense_comment" class="frm_tarea" rows="3" cols="60">' . clean_output($this->getDataString('comment')) . "</textarea>\n" . "</td>\n";
         echo "</tr>\n";
     }
     echo "</table>\n";
 }