. */ /** * @brief Action : simple confirm * * Open a modal box to confirm a status modification. Used by the core (manage_action.php page). * * @file * @author Claire Figueras * @date $date$ * @version $Revision$ * @ingroup apps */ /** * $confirm bool false */ $confirm = false; $etapes = array('form'); $frm_width='285px'; $frm_height = 'auto'; function get_form_txt($values, $path_manage_action, $id_action, $table, $module, $coll_id, $mode ) { $res_id=$values[0]; $db = new Database(); $labelAction = ''; if ($id_action <> '') { $stmt = $db->query("select label_action from actions where id = ?",array($id_action)); $resAction = $stmt->fetchObject(); $labelAction = functions::show_string($resAction->label_action); } $values_str = ''; if(empty($_SESSION['stockCheckbox'])){ for($i=0; $i < count($values);$i++) { $values_str .= $values[$i].', '; } }else{ for($i=0; $i < count($_SESSION['stockCheckbox']);$i++) { $values_str .= $_SESSION['stockCheckbox'][$i].', '; } } $values_str = preg_replace('/, $/', '', $values_str); require 'modules/templates/class/templates_controler.php'; $templatesControler = new templates_controler(); $templates = array(); if ($destination <> '') { $templates = $templatesControler->getAllTemplatesForProcess($destination); } else { $templates = $templatesControler->getAllTemplatesForSelect(); } $frm_str .='
'._ACTION_CONFIRM.'

'.$labelAction.' ?

'; $frm_str .=''._PROCESS_NOTES.':
'; $frm_str .= ''; $frm_str .= ''; $frm_str .=''; $frm_str .=''; $frm_str .='
'; $frm_str .=' '; $frm_str .=' '; $frm_str .='
'; return addslashes($frm_str); } function check_form($form_id,$values) { return true; } function manage_form($arr_id, $history, $id_action, $label_action, $status, $coll_id, $table, $values_form ) { if(empty($values_form) || count($arr_id) < 1) return false; require_once('modules/notes/class/notes_controler.php'); $note = new notes_controler(); $db = new Database(); $formValues = array(); for($i=0; $iretrieve_table_from_coll($coll_id); # save note if($formValues['note_content_to_users'] != ''){ //Add notes $nb_avis = $sequence +1; $userIdTypist = $_SESSION['user']['UserId']; $content_note = $formValues['note_content_to_users']; $content_note = str_replace(";", ".", $content_note); $content_note = str_replace("--", "-", $content_note); $content_note = $content_note; $note->addNote($res_id, $coll_id, $content_note); } return array('result' => $res_id.'#', 'history_msg' => ''); } /** * Get the value of a given field in the values returned by the form * * @param $values Array Values of the form to check * @param $field String the field * @return String the value, false if the field is not found **/ function get_value_fields($values, $field) { for($i=0; $i