Skip to content
Snippets Groups Projects
Commit a7f95e99 authored by Henri Queneau's avatar Henri Queneau
Browse files

FIX #5317 enabled to add a note when you confirm from indexingbasket

parent 832ddc87
No related branches found
No related tags found
No related merge requests found
...@@ -75,24 +75,26 @@ $frm_height = 'auto'; ...@@ -75,24 +75,26 @@ $frm_height = 'auto';
$templates = $templatesControler->getAllTemplatesForSelect(); $templates = $templatesControler->getAllTemplatesForSelect();
} }
$frm_str .='<center style="font-size:15px;">'._ACTION_CONFIRM.'<br/><br/><b>'.$labelAction.' ?</b></center><br/>'; $frm_str .='<center style="font-size:15px;">'._ACTION_CONFIRM.'<br/><br/><b>'.$labelAction.' ?</b></center><br/>';
$frm_str .='<b>'._PROCESS_NOTES.':</b><br/>'; if($_SESSION['current_basket']['id'] != 'IndexingBasket'){
$frm_str .= '<select name="templateNotes" id="templateNotes" style="width:98%;margin-bottom: 10px;background-color: White;border: 1px solid #999;color: #666;text-align: left;" ' $frm_str .='<b>'._PROCESS_NOTES.':</b><br/>';
$frm_str .= '<select name="templateNotes" id="templateNotes" style="width:98%;margin-bottom: 10px;background-color: White;border: 1px solid #999;color: #666;text-align: left;" '
. 'onchange="addTemplateToNote($(\'templateNotes\').value, \'' . 'onchange="addTemplateToNote($(\'templateNotes\').value, \''
. $_SESSION['config']['businessappurl'] . 'index.php?display=true' . $_SESSION['config']['businessappurl'] . 'index.php?display=true'
. '&module=templates&page=templates_ajax_content_for_notes\');document.getElementById(\'notes\').focus();">'; . '&module=templates&page=templates_ajax_content_for_notes\');document.getElementById(\'notes\').focus();">';
$frm_str .= '<option value="">' . _SELECT_NOTE_TEMPLATE . '</option>'; $frm_str .= '<option value="">' . _SELECT_NOTE_TEMPLATE . '</option>';
for ($i=0;$i<count($templates);$i++) { for ($i=0;$i<count($templates);$i++) {
if ($templates[$i]['TYPE'] == 'TXT' && ($templates[$i]['TARGET'] == 'notes' || $templates[$i]['TARGET'] == '')) { if ($templates[$i]['TYPE'] == 'TXT' && ($templates[$i]['TARGET'] == 'notes' || $templates[$i]['TARGET'] == '')) {
$frm_str .= '<option value="'; $frm_str .= '<option value="';
$frm_str .= $templates[$i]['ID']; $frm_str .= $templates[$i]['ID'];
$frm_str .= '">'; $frm_str .= '">';
$frm_str .= $templates[$i]['LABEL']; $frm_str .= $templates[$i]['LABEL'];
}
$frm_str .= '</option>';
} }
$frm_str .= '</option>'; $frm_str .= '</select><br />';
}
$frm_str .= '</select><br />';
$frm_str .= '<textarea placeholder="motif de l\'action (optionnel) ..." style="width:98%;height:60px;resize:none;" name="notes" id="notes" onblur="document.getElementById(\'note_content_to_users\').value=document.getElementById(\'notes\').value;"></textarea>'; $frm_str .= '<textarea placeholder="motif de l\'action (optionnel) ..." style="width:98%;height:60px;resize:none;" name="notes" id="notes" onblur="document.getElementById(\'note_content_to_users\').value=document.getElementById(\'notes\').value;"></textarea>';
}
$frm_str .='<div id="form2" style="border:none;">'; $frm_str .='<div id="form2" style="border:none;">';
$frm_str .= '<form name="frm_redirect_dep" id="frm_redirect_dep" method="post" class="forms" action="#">'; $frm_str .= '<form name="frm_redirect_dep" id="frm_redirect_dep" method="post" class="forms" action="#">';
$frm_str .= '<input type="hidden" name="chosen_action" id="chosen_action" value="end_action" />'; $frm_str .= '<input type="hidden" name="chosen_action" id="chosen_action" value="end_action" />';
......
...@@ -17,15 +17,16 @@ if (count($actions) > 0) { ...@@ -17,15 +17,16 @@ if (count($actions) > 0) {
$frmStr .= '<option value="">' . _CHOOSE_ACTION . '</option>'; $frmStr .= '<option value="">' . _CHOOSE_ACTION . '</option>';
for ($indAct = 0; $indAct < count($actions); $indAct ++) { for ($indAct = 0; $indAct < count($actions); $indAct ++) {
if ($indAct == 0 && $_SESSION['current_basket']['id'] == 'IndexingBasket' && count($actions) > 1) { //A quoi sert cette condition? si elle est active elle n'affiche pas toutes les actions dans la page d'indexation.
/*if ($indAct == 0 && $_SESSION['current_basket']['id'] == 'IndexingBasket' && count($actions) > 1) {
} else { } else {*/
$frmStr .= '<option value="' . $actions[$indAct]['VALUE'] . '"'; $frmStr .= '<option value="' . $actions[$indAct]['VALUE'] . '"';
if ($indAct == 0) { if ($indAct == 0) {
$frmStr .= 'selected="selected"'; $frmStr .= 'selected="selected"';
} }
$frmStr .= '>' . $actions[$indAct]['LABEL'] . '</option>'; $frmStr .= '>' . $actions[$indAct]['LABEL'] . '</option>';
} /*}*/
} }
......
...@@ -140,7 +140,7 @@ if($_POST['req'] == 'valid_form' && !empty($_POST['action_id']) && isset($_POST[ ...@@ -140,7 +140,7 @@ if($_POST['req'] == 'valid_form' && !empty($_POST['action_id']) && isset($_POST[
exit(); exit();
} }
} }
elseif(trim($_POST['req']) == 'change_status' && !empty($_POST['values']) && !empty($_POST['new_status']) && !empty($_POST['table'])) elseif(trim($_POST['req']) == 'change_status' && !empty($_POST['values'])&& $_POST['values'] != 'none#' && !empty($_POST['new_status']) && !empty($_POST['table']))
{ {
$stmt = $db->query("select id from status where id = ?", array($_POST['new_status'])); $stmt = $db->query("select id from status where id = ?", array($_POST['new_status']));
$lineStatus = $stmt->fetchObject(); $lineStatus = $stmt->fetchObject();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment