colspans and inconditional GETPOST

This commit is contained in:
altairis-noe 2021-04-13 16:13:57 +02:00
parent 14c93d14e4
commit ee1693edf0

View File

@ -307,9 +307,7 @@ if (empty($reshook)) {
$object->status = GETPOST('statut'); $object->status = GETPOST('statut');
$object->status_buy = GETPOST('statut_buy'); $object->status_buy = GETPOST('statut_buy');
$object->status_batch = GETPOST('status_batch'); $object->status_batch = GETPOST('status_batch');
if ($object->status_batch !== 0) {
$object->batch_mask = GETPOST('batch_mask'); $object->batch_mask = GETPOST('batch_mask');
} else $object->batch_mask = '';
$object->barcode_type = GETPOST('fk_barcode_type'); $object->barcode_type = GETPOST('fk_barcode_type');
$object->barcode = GETPOST('barcode'); $object->barcode = GETPOST('barcode');
@ -478,9 +476,7 @@ if (empty($reshook)) {
$object->status = GETPOST('statut', 'int'); $object->status = GETPOST('statut', 'int');
$object->status_buy = GETPOST('statut_buy', 'int'); $object->status_buy = GETPOST('statut_buy', 'int');
$object->status_batch = GETPOST('status_batch', 'aZ09'); $object->status_batch = GETPOST('status_batch', 'aZ09');
if ($object->status_batch !== 0) {
$object->batch_mask = GETPOST('batch_mask', 'alpha'); $object->batch_mask = GETPOST('batch_mask', 'alpha');
} else $object->batch_mask = '';
$object->fk_default_warehouse = GETPOST('fk_default_warehouse'); $object->fk_default_warehouse = GETPOST('fk_default_warehouse');
// removed from update view so GETPOST always empty // removed from update view so GETPOST always empty
/* /*
@ -1108,7 +1104,6 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print '<td id="field_mask">'; print '<td id="field_mask">';
print $form->textwithpicto('<input type="text" class="flat" size="24" name="batch_mask" id="batch_mask_input">', $tooltip, 1, 1); print $form->textwithpicto('<input type="text" class="flat" size="24" name="batch_mask" id="batch_mask_input">', $tooltip, 1, 1);
print '</td>'; print '</td>';
}
print '<script type="text/javascript"> print '<script type="text/javascript">
$(document).ready(function() { $(document).ready(function() {
$("#field_mask, #mask_option").addClass("hideobject"); $("#field_mask, #mask_option").addClass("hideobject");
@ -1127,6 +1122,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
}) })
}) })
</script>'; </script>';
} else {
print '<td colspan="2"></td>';
}
} }
print '</tr>'; print '</tr>';
@ -1633,6 +1631,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
}) })
}) })
</script>'; </script>';
} else {
print '<td colspan="2"></td>';
} }
print '</tr>'; print '</tr>';
} }