Skip to content
Snippets Groups Projects
Commit 1040815f authored by Pegane Nestor's avatar Pegane Nestor
Browse files

FEAT #9143 hide barcode if its empty on process page

parent 16f17cd0
No related branches found
No related tags found
No related merge requests found
......@@ -277,19 +277,28 @@ function get_form_txt($values, $path_manage_action, $id_action, $table, $module,
$frm_str .= '<div>';
$frm_str .= '<table width="95%" align="left" border="0">';
// Displays the document indexes
foreach (array_keys($data) as $key) {
foreach (array_keys($data) as $key) {
if ($key != 'is_multicontacts' && $key != 'folder' || ($key == 'is_multicontacts' && $data[$key]['show_value'] == 'Y')) {
$frm_str .= '<tr>';
$frm_str .= '<td width="50%" align="left"><span class="form_title_process">'
.$data[$key]['label'].' :</span>';
if (isset($data[$key]['addon'])) {
$frm_str .= ' '.$data[$key]['addon'];
if($key == 'barcode' && empty($data[$key]['value'])) {
$frm_str .= '';
} else {
$frm_str .= '<tr>';
$frm_str .= '<td width="50%" align="left"><span class="form_title_process">'
.$data[$key]['label'].' :</span>';
if (isset($data[$key]['addon'])) {
$frm_str .= ' '.$data[$key]['addon'];
}
$frm_str .= '<td>';
}
$frm_str .= '<td>';
if ($data[$key]['display'] == 'textinput') {
$frm_str .= '<input type="text" name="'.$key.'" id="'.$key
if($key == 'barcode' && empty($data[$key]['value'])) {
$frm_str .= '';
} else{
$frm_str .= '<input type="text" name="'.$key.'" id="'.$key
.'" value="'.$data[$key]['show_value']
.'" readonly="readonly" class="readonly" style="border:none;" />';
}
} elseif ($data[$key]['display'] == 'textarea') {
if ($key == 'is_multicontacts') {
$frm_str .= '<input type="hidden" name="'.$key.'" id="'.$key
......@@ -322,9 +331,12 @@ function get_form_txt($values, $path_manage_action, $id_action, $table, $module,
if ($key == 'type_id') {
$_SESSION['category_id_session'] = $data[$key]['value'];
}
$frm_str .= '</td>';
$frm_str .= '</tr>';
if($key == 'barcode' && empty($data[$key]['value'])) {
$frm_str .= '';
} else {
$frm_str .= '</td>';
$frm_str .= '</tr>';
}
}
}
if ($chrono_number != '' && _ID_TO_DISPLAY == 'res_id') {
......
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