deprecate formbarcode:form_barcode_type
This commit is contained in:
parent
312a606345
commit
a36f41728f
@ -180,22 +180,37 @@ class FormBarCode
|
|||||||
* @param int $selected Id condition preselected
|
* @param int $selected Id condition preselected
|
||||||
* @param string $htmlname Nom du formulaire select
|
* @param string $htmlname Nom du formulaire select
|
||||||
* @return void
|
* @return void
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
function form_barcode_type($page, $selected='', $htmlname='barcodetype_id')
|
function form_barcode_type($page, $selected='', $htmlname='barcodetype_id')
|
||||||
{
|
{
|
||||||
global $langs,$conf;
|
print $this->formBarcodeType($page, $selected, $htmlname);
|
||||||
if ($htmlname != "none")
|
}
|
||||||
{
|
|
||||||
print '<form method="post" action="'.$page.'">';
|
/**
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
* Return html form to select type of barcode
|
||||||
print '<input type="hidden" name="action" value="set'.$htmlname.'">';
|
*
|
||||||
print '<table class="nobordernopadding" cellpadding="0" cellspacing="0">';
|
* @param string $page Page
|
||||||
print '<tr><td>';
|
* @param int $selected Id condition preselected
|
||||||
print $this->selectBarcodeType($selected, $htmlname, 1);
|
* @param string $htmlname Nom du formulaire select
|
||||||
print '</td>';
|
* @return string
|
||||||
print '<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
*/
|
||||||
print '</td></tr></table></form>';
|
function formBarcodeType($page, $selected='', $htmlname='barcodetype_id')
|
||||||
|
{
|
||||||
|
global $langs, $conf;
|
||||||
|
$out = '';
|
||||||
|
if ($htmlname != "none") {
|
||||||
|
$out .= '<form method="post" action="' . $page . '">';
|
||||||
|
$out .= '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
||||||
|
$out .= '<input type="hidden" name="action" value="set'.$htmlname.'">';
|
||||||
|
$out .= '<table class="nobordernopadding" cellpadding="0" cellspacing="0">';
|
||||||
|
$out .= '<tr><td>';
|
||||||
|
$out .= $this->selectBarcodeType($selected, $htmlname, 1);
|
||||||
|
$out .= '</td>';
|
||||||
|
$out .= '<td align="left"><input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
|
||||||
|
$out .= '</td></tr></table></form>';
|
||||||
}
|
}
|
||||||
|
return $out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1639,7 +1639,7 @@ else
|
|||||||
}
|
}
|
||||||
if ($action == 'editbarcodetype')
|
if ($action == 'editbarcodetype')
|
||||||
{
|
{
|
||||||
$formbarcode->form_barcode_type($_SERVER['PHP_SELF'].'?id='.$object->id,$object->barcode_type,'fk_barcode_type');
|
print $formbarcode->formBarcodeType($_SERVER['PHP_SELF'].'?id='.$object->id, $object->barcode_type, 'fk_barcode_type');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user