mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-23 18:01:36 +01:00
Fix: $optiontype not used
Fix: select_array is deprecated
This commit is contained in:
@@ -230,7 +230,7 @@ if ($resql)
|
|||||||
|
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
$listetype=$membertypestatic->liste_array();
|
$listetype=$membertypestatic->liste_array();
|
||||||
$form->select_array("type", $listetype, $_REQUEST["type"], 1, 0, 0, 0, '', 0, 12);
|
$form->selectarray("type", $listetype, $_REQUEST["type"], 1, 0, 0, '', 0, 12);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
|
|||||||
@@ -457,13 +457,6 @@ if ($rowid > 0)
|
|||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
print '<input class="flat" type="text" name="search_login" value="'.$_REQUEST["search_login"].'" size="7"></td>';
|
print '<input class="flat" type="text" name="search_login" value="'.$_REQUEST["search_login"].'" size="7"></td>';
|
||||||
|
|
||||||
// Type
|
|
||||||
/*print '<td class="liste_titre">';
|
|
||||||
$listetype=$membertypestatic->liste_array();
|
|
||||||
$form->select_array("type", $listetype, $_REQUEST["type"], 1, 0, 0, 0, '', 0, 12);
|
|
||||||
print '</td>';
|
|
||||||
*/
|
|
||||||
|
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
|
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
|
|||||||
@@ -2727,21 +2727,13 @@ class Form
|
|||||||
* \param disabled Html select box is disabled
|
* \param disabled Html select box is disabled
|
||||||
* \return string HTML select string
|
* \return string HTML select string
|
||||||
*/
|
*/
|
||||||
function selectarray($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $optionType=0, $option='', $translate=0, $maxlen=0, $disabled=0)
|
function selectarray($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $option='', $translate=0, $maxlen=0, $disabled=0)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$out='';
|
$out='';
|
||||||
|
|
||||||
// \TODO Simplify optionType and option (only one should be necessary)
|
$out.='<select '.($disabled?'disabled="true"':'').' class="flat" name="'.$htmlname.'" '.($option != ''?$option:'').'>';
|
||||||
if ($optionType == 1 && $option != '')
|
|
||||||
{
|
|
||||||
$out.='<select '.($disabled?'disabled="true"':'').' class="flat" name="'.$htmlname.'" '.$option.'>';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$out.='<select '.($disabled?'disabled="true"':'').' class="flat" name="'.$htmlname.'">';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($show_empty)
|
if ($show_empty)
|
||||||
{
|
{
|
||||||
@@ -2796,9 +2788,9 @@ class Form
|
|||||||
* \param maxlen Length maximum for labels
|
* \param maxlen Length maximum for labels
|
||||||
* \deprecated Use selectarray instead
|
* \deprecated Use selectarray instead
|
||||||
*/
|
*/
|
||||||
function select_array($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $optionType=0, $option='', $translate=0, $maxlen=0)
|
function select_array($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $option='', $translate=0, $maxlen=0)
|
||||||
{
|
{
|
||||||
print $this->selectarray($htmlname, $array, $id, $show_empty, $key_in_label, $value_as_key, $optionType, $option, $translate, $maxlen);
|
print $this->selectarray($htmlname, $array, $id, $show_empty, $key_in_label, $value_as_key, $option, $translate, $maxlen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -426,7 +426,7 @@ if ($_GET["action"] == 'create')
|
|||||||
print "<tr><td>".$langs->trans("DeliveryMethod")."</td>";
|
print "<tr><td>".$langs->trans("DeliveryMethod")."</td>";
|
||||||
print '<td colspan="3">';
|
print '<td colspan="3">';
|
||||||
$expe->fetch_delivery_methods();
|
$expe->fetch_delivery_methods();
|
||||||
$html->select_array("expedition_method_id",$expe->meths,$_POST["expedition_method_id"],1,0,0,0,"",1);
|
$html->selectarray("expedition_method_id",$expe->meths,$_POST["expedition_method_id"],1,0,0,"",1);
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
// Tracking number
|
// Tracking number
|
||||||
@@ -875,7 +875,7 @@ else
|
|||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="setexpedition_method_id">';
|
print '<input type="hidden" name="action" value="setexpedition_method_id">';
|
||||||
$expedition->fetch_delivery_methods();
|
$expedition->fetch_delivery_methods();
|
||||||
$html->select_array("expedition_method_id",$expedition->meths,$expedition->expedition_method_id,1,0,0,0,"",1);
|
$html->selectarray("expedition_method_id",$expedition->meths,$expedition->expedition_method_id,1,0,0,"",1);
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -268,16 +268,8 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
// Warehouse
|
// Warehouse
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
/*if (sizeof($user->entrepots) === 1) deprecated
|
print $html->selectarray("entrepot_".$i, $entrepot->list_array(), '', $disabled, 0, 0, '', 0, 0, $disabled);
|
||||||
{
|
|
||||||
$uentrepot = array();
|
|
||||||
$uentrepot[$user->entrepots[0]['id']] = $user->entrepots[0]['label'];
|
|
||||||
print $html->selectarray("entrepot_".$i, $uentrepot, '', $disabled, 0, 0, 0, '', 0, 0, $disabled);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{*/
|
|
||||||
print $html->selectarray("entrepot_".$i, $entrepot->list_array(), '', $disabled, 0, 0, 0, '', 0, 0, $disabled);
|
|
||||||
//}
|
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user