[Qual] Fixed HTML select form selected attribute

Dolibarr uses HTML 4.01 or HTML5 doctypes.
The select form selected attribute should not have a value.
This commit is contained in:
Raphaël Doursenaud 2015-05-07 12:20:20 +02:00
parent b8d9c20731
commit 5d2f081152
46 changed files with 205 additions and 205 deletions

View File

@ -221,7 +221,7 @@ if ($resql) {
$row = $db->fetch_row($resql);
print '<option value="' . $row[0] . '"';
print $conf->global->CHARTOFACCOUNTS == $row[0] ? ' selected="selected"' : '';
print $conf->global->CHARTOFACCOUNTS == $row[0] ? ' selected' : '';
print '>' . $row[1] . ' - ' . $row[3] . '</option>';
$i ++;
@ -291,4 +291,4 @@ print "</table>\n";
print '<br /><br /><div style="text-align:center"><input type="submit" class="button" value="'.$langs->trans('Modify').'" name="button"></div>';
print '</form>';
llxFooter();
$db->close();
$db->close();

View File

@ -66,7 +66,7 @@ class FormVentilation extends Form
$selected = '';
if ($selectedkey == $obj->import_key) {
$selected = ' selected="selected" ';
$selected = ' selected ';
}
$out .= '<OPTION value="' . $obj->import_key . '"' . $selected . '>' . $obj->import_key . '</OPTION>';
@ -126,8 +126,8 @@ class FormVentilation extends Form
// Remember guy's we store in database llx_facturedet the rowid of accountingaccount and not the account_number
// Because same account_number can be share between different accounting_system and do have the same meaning
if (($selectid != '') && $selectid == $obj->rowid) {
// $out .= '<option value="' . $obj->account_number . '" selected="selected">' . $label . '</option>';
$out .= '<option value="' . $obj->rowid . '" selected="selected">' . $label . '</option>';
// $out .= '<option value="' . $obj->account_number . '" selected>' . $label . '</option>';
$out .= '<option value="' . $obj->rowid . '" selected>' . $label . '</option>';
} else {
// $out .= '<option value="' . $obj->account_number . '">' . $label . '</option>';
$out .= '<option value="' . $obj->rowid . '">' . $label . '</option>';
@ -184,7 +184,7 @@ class FormVentilation extends Form
$label = $obj->pcg_type;
if (($selectid != '') && $selectid == $obj->pcg_type) {
$out .= '<option value="' . $obj->pcg_type . '" selected="selected">' . $label . '</option>';
$out .= '<option value="' . $obj->pcg_type . '" selected>' . $label . '</option>';
} else {
$out .= '<option value="' . $obj->pcg_type . '">' . $label . '</option>';
}
@ -240,7 +240,7 @@ class FormVentilation extends Form
$label = $obj->pcg_subtype;
if (($selectid != '') && $selectid == $obj->pcg_subtype) {
$out .= '<option value="' . $obj->pcg_subtype . '" selected="selected">' . $label . '</option>';
$out .= '<option value="' . $obj->pcg_subtype . '" selected>' . $label . '</option>';
} else {
$out .= '<option value="' . $obj->pcg_subtype . '">' . $label . '</option>';
}

View File

@ -670,7 +670,7 @@ if (! empty($conf->banque->enabled))
$row = $db->fetch_row($resql);
print '<option value="'.$row[0].'"';
print $conf->global->FACTURE_RIB_NUMBER == $row[0] ? ' selected="selected"':'';
print $conf->global->FACTURE_RIB_NUMBER == $row[0] ? ' selected':'';
print '>'.$row[1].'</option>';
$i++;
@ -694,7 +694,7 @@ print "<td>".$langs->trans("SuggestPaymentByChequeToAddress")."</td>";
print "<td>";
print '<select class="flat" name="chq" id="chq">';
print '<option value="0">'.$langs->trans("DoNotSuggestPaymentMode").'</option>';
print '<option value="-1"'.($conf->global->FACTURE_CHQ_NUMBER?' selected="selected"':'').'>'.$langs->trans("MenuCompanySetup").' ('.($mysoc->name?$mysoc->name:$langs->trans("NotDefined")).')</option>';
print '<option value="-1"'.($conf->global->FACTURE_CHQ_NUMBER?' selected':'').'>'.$langs->trans("MenuCompanySetup").' ('.($mysoc->name?$mysoc->name:$langs->trans("NotDefined")).')</option>';
$sql = "SELECT rowid, label";
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account";
@ -713,7 +713,7 @@ if ($resql)
$row = $db->fetch_row($resql);
print '<option value="'.$row[0].'"';
print $conf->global->FACTURE_CHQ_NUMBER == $row[0] ? ' selected="selected"':'';
print $conf->global->FACTURE_CHQ_NUMBER == $row[0] ? ' selected':'';
print '>'.$langs->trans("OwnerOfBankAccount",$row[1]).'</option>';
$i++;

View File

@ -323,8 +323,8 @@ if ($action == 'create')
{
print '<select name="type" class="flat" id="topleft">';
print '<option value="">&nbsp;</option>';
print '<option value="top"'.($_POST["type"] && $_POST["type"]=='top'?' selected="true"':'').'>'.$langs->trans('Top').'</option>';
print '<option value="left"'.($_POST["type"] && $_POST["type"]=='left'?' selected="true"':'').'>'.$langs->trans('Left').'</option>';
print '<option value="top"'.($_POST["type"] && $_POST["type"]=='top'?' selected':'').'>'.$langs->trans('Top').'</option>';
print '<option value="left"'.($_POST["type"] && $_POST["type"]=='left'?' selected':'').'>'.$langs->trans('Left').'</option>';
print '</select>';
}
// print '<input type="text" size="50" name="type" value="'.$type.'">';
@ -356,8 +356,8 @@ if ($action == 'create')
// Target
print '<tr><td>'.$langs->trans('Target').'</td><td><select class="flat" name="target">';
print '<option value=""'.($menu->target==""?' selected="true"':'').'>'.$langs->trans('').'</option>';
print '<option value="_blank"'.($menu->target=="_blank"?' selected="true"':'').'>'.$langs->trans('_blank').'</option>';
print '<option value=""'.($menu->target==""?' selected':'').'>'.$langs->trans('').'</option>';
print '<option value="_blank"'.($menu->target=="_blank"?' selected':'').'>'.$langs->trans('_blank').'</option>';
print '</select></td></td><td>'.$langs->trans('DetailTarget').'</td></tr>';
// Enabled
@ -406,9 +406,9 @@ elseif ($action == 'edit')
// User
print '<tr><td class="nowrap fieldrequired">'.$langs->trans('MenuForUsers').'</td><td><select class="flat" name="user">';
print '<option value="2"'.($menu->user==2?' selected="true"':'').'>'.$langs->trans("AllMenus").'</option>';
print '<option value="0"'.($menu->user==0?' selected="true"':'').'>'.$langs->trans('Internal').'</option>';
print '<option value="1"'.($menu->user==1?' selected="true"':'').'>'.$langs->trans('External').'</option>';
print '<option value="2"'.($menu->user==2?' selected':'').'>'.$langs->trans("AllMenus").'</option>';
print '<option value="0"'.($menu->user==0?' selected':'').'>'.$langs->trans('Internal').'</option>';
print '<option value="1"'.($menu->user==1?' selected':'').'>'.$langs->trans('External').'</option>';
print '</select></td><td>'.$langs->trans('DetailUser').'</td></tr>';
// Type
@ -438,8 +438,8 @@ elseif ($action == 'edit')
// Target
print '<tr><td>'.$langs->trans('Target').'</td><td><select class="flat" name="target">';
print '<option value=""'.($menu->target==""?' selected="true"':'').'>'.$langs->trans('').'</option>';
print '<option value="_blank"'.($menu->target=="_blank"?' selected="true"':'').'>'.$langs->trans('_blank').'</option>';
print '<option value=""'.($menu->target==""?' selected':'').'>'.$langs->trans('').'</option>';
print '<option value="_blank"'.($menu->target=="_blank"?' selected':'').'>'.$langs->trans('_blank').'</option>';
print '</select></td><td>'.$langs->trans('DetailTarget').'</td></tr>';
// Enabled

View File

@ -215,7 +215,7 @@ print '<tr '.$bc[false].'><td style="padding-left: 8px">';
<label for="select_sql_compat"> <?php echo $langs->trans("ExportCompatibility"); ?></label>
<select name="sql_compat" id="select_sql_compat" class="flat">
<option value="NONE" selected="selected">NONE</option>
<option value="NONE" selected>NONE</option>
<option value="ANSI">ANSI</option>
<option value="DB2">DB2</option>
<option value="MAXDB">MAXDB</option>
@ -340,7 +340,7 @@ print '<tr '.$bc[false].'><td style="padding-left: 8px">';
<fieldset><legend><?php echo $langs->trans("ExportOptions"); ?></legend>
<label for="select_sql_compat"> <?php echo $langs->trans("ExportCompatibility"); ?></label>
<select name="sql_compat" id="select_sql_compat" class="flat">
<option value="POSTGRESQL" selected="selected">POSTGRESQL</option>
<option value="POSTGRESQL" selected>POSTGRESQL</option>
<option value="ANSI">ANSI</option>
</select><br>
<!-- <input type="checkbox" name="drop_database" value="yes"

View File

@ -73,7 +73,7 @@ $langs->load("cashdesk");
for ($i = 0; $i < $nbtoshow; $i++)
{
if ( $id == $tab_designations[$i]['rowid'] )
$selected = 'selected="selected"';
$selected = 'selected';
else
$selected = '';
@ -132,7 +132,7 @@ $langs->load("cashdesk");
for($i=0;$i < $tab_tva_size;$i++) {
if ( $tva_tx == $tab_tva[$i]['taux'] )
$selected = 'selected="selected"';
$selected = 'selected';
else
$selected = '';

View File

@ -368,7 +368,7 @@ if ($resql)
$options_from = '<option value="">&nbsp;</option>';
foreach ($tab_level as $tab_level_sortorder => $tab_level_label)
{
$options_from .= '<option value="'.$tab_level_sortorder.'"'.($search_level_from == $tab_level_sortorder ? ' selected="selected"':'').'>';
$options_from .= '<option value="'.$tab_level_sortorder.'"'.($search_level_from == $tab_level_sortorder ? ' selected':'').'>';
$options_from .= $langs->trans($tab_level_label);
$options_from .= '</option>';
}
@ -380,7 +380,7 @@ if ($resql)
$options_to = '<option value="">&nbsp;</option>';
foreach ($tab_level as $tab_level_sortorder => $tab_level_label)
{
$options_to .= '<option value="'.$tab_level_sortorder.'"'.($search_level_to == $tab_level_sortorder ? ' selected="selected"':'').'>';
$options_to .= '<option value="'.$tab_level_sortorder.'"'.($search_level_to == $tab_level_sortorder ? ' selected':'').'>';
$options_to .= $langs->trans($tab_level_label);
$options_to .= '</option>';
}

View File

@ -202,7 +202,7 @@ if ($id > 0 || ! empty($ref))
$var=True;
$num = $db->num_rows($result);
$i = 0;
$options = '<option value="0" selected="true">&nbsp;</option>';
$options = '<option value="0" selected>&nbsp;</option>';
while ($i < $num)
{
$obj = $db->fetch_object($result);

View File

@ -215,7 +215,7 @@ if ($result)
$var=True;
$num = $db->num_rows($result);
$i = 0;
$options = "<option value=\"0\" selected=\"true\">&nbsp;</option>";
$options = "<option value=\"0\" selected>&nbsp;</option>";
while ($i < $num)
{
$obj = $db->fetch_object($result);

View File

@ -115,12 +115,12 @@ if ($resql)
{
$var=True;
$num = $db->num_rows($resql);
if ($num > 0) $options .= '<option value="0"'.(GETPOST('cat')?'':' selected="true"').'>&nbsp;</option>';
if ($num > 0) $options .= '<option value="0"'.(GETPOST('cat')?'':' selected').'>&nbsp;</option>';
$i = 0;
while ($i < $num)
{
$obj = $db->fetch_object($resql);
$options .= '<option value="'.$obj->rowid.'"'.(GETPOST('cat')==$obj->rowid?' selected="true"':'').'>'.$obj->label.'</option>'."\n";
$options .= '<option value="'.$obj->rowid.'"'.(GETPOST('cat')==$obj->rowid?' selected':'').'>'.$obj->label.'</option>'."\n";
$i++;
}
$db->free($resql);

View File

@ -2018,13 +2018,13 @@ if ($action == 'create')
{
print '<tr><td>' . $langs->trans('CreateFromRepeatableInvoice') . '</td><td>';
print '<select class="flat" name="fac_rec">';
print '<option value="0" selected="selected"></option>';
print '<option value="0" selected></option>';
while ($i < $num)
{
$objp = $db->fetch_object($resql);
print '<option value="' . $objp->rowid . '"';
if (GETPOST('fac_rec') == $objp->rowid)
print ' selected="selected"';
print ' selected';
print '>' . $objp->titre . ' (' . price($objp->total_ttc) . ' ' . $langs->trans("TTC") . ')</option>';
$i ++;
}
@ -2047,7 +2047,7 @@ if ($action == 'create')
{
$options .= '<option value="' . $facparam ['id'] . '"';
if ($facparam ['id'] == $_POST['fac_replacement'])
$options .= ' selected="selected"';
$options .= ' selected';
$options .= '>' . $facparam ['ref'];
$options .= ' (' . $facturestatic->LibStatut(0, $facparam ['status']) . ')';
$options .= '</option>';
@ -2072,7 +2072,7 @@ if ($action == 'create')
$optionsav .= '<option value="' . $key . '"';
if ($key == $_POST['fac_avoir'])
$optionsav .= ' selected="selected"';
$optionsav .= ' selected';
$optionsav .= '>';
$optionsav .= $newinvoice_static->ref;
$optionsav .= ' (' . $newinvoice_static->getLibStatut(1, $valarray ['paymentornot']) . ')';
@ -2132,7 +2132,7 @@ if ($action == 'create')
$opt = $form->load_situation_invoices(GETPOST('originid'), $socid);
print '<tr height="18"><td valign="middle">';
print '<input type="radio" name="type" value="5"' . (GETPOST('type') == 5 && GETPOST('originid') ? ' checked' : '') . ' ';
if ($opt == '<option value ="0" selected="selected">' . $langs->trans('NoSituations') . '</option>' || (GETPOST('origin') && GETPOST('origin') != 'facture')) print 'disabled';
if ($opt == '<option value ="0" selected>' . $langs->trans('NoSituations') . '</option>' || (GETPOST('origin') && GETPOST('origin') != 'facture')) print 'disabled';
print '>';
print '</td><td valign="middle">';
$text = $langs->trans("InvoiceSituationAsk") . ' ';

View File

@ -737,7 +737,7 @@ class ExtraFields
{
list($val, $parent) = explode('|', $val);
$out.='<option value="'.$key.'"';
$out.= ($value==$key?' selected="selected"':'');
$out.= ($value==$key?' selected':'');
$out.= (!empty($parent)?' parent="'.$parent.'"':'');
$out.='>'.$val.'</option>';
}
@ -849,7 +849,7 @@ class ExtraFields
$labeltoshow=dol_trunc($obj->$field_toshow,18).' ';
}
}
$out.='<option value="'.$obj->rowid.'" selected="selected">'.$labeltoshow.'</option>';
$out.='<option value="'.$obj->rowid.'" selected>'.$labeltoshow.'</option>';
}
else
{
@ -866,7 +866,7 @@ class ExtraFields
if (empty($labeltoshow)) $labeltoshow='(not defined)';
if ($value==$obj->rowid)
{
$out.='<option value="'.$obj->rowid.'" selected="selected">'.$labeltoshow.'</option>';
$out.='<option value="'.$obj->rowid.'" selected>'.$labeltoshow.'</option>';
}
if (!empty($InfoFieldList[3]))
@ -875,7 +875,7 @@ class ExtraFields
}
$out.='<option value="'.$obj->rowid.'"';
$out.= ($value==$obj->rowid?' selected="selected"':'');
$out.= ($value==$obj->rowid?' selected':'');
$out.= (!empty($parent)?' parent="'.$parent.'"':'');
$out.='>'.$labeltoshow.'</option>';
}

View File

@ -539,7 +539,7 @@ class Form
if ($selected && $selected != '-1' && ($selected == $row['rowid'] || $selected == $row['code_iso'] || $selected == $row['code_iso3'] || $selected == $row['label']) )
{
$foundselected=true;
$out.= '<option value="'.$row['rowid'].'" selected="selected">';
$out.= '<option value="'.$row['rowid'].'" selected>';
}
else
{
@ -623,7 +623,7 @@ class Form
{
if ($selected && ($selected == $row['rowid'] || $selected == $row['code']))
{
$out.= '<option value="'.$row['rowid'].'" selected="selected">';
$out.= '<option value="'.$row['rowid'].'" selected>';
}
else
{
@ -676,16 +676,16 @@ class Form
if ($showempty)
{
print '<option value="-1"';
if ($selected == -1) print ' selected="selected"';
if ($selected == -1) print ' selected';
print '>&nbsp;</option>';
}
print '<option value="0"';
if (0 == $selected) print ' selected="selected"';
if (0 == $selected) print ' selected';
print '>'.$langs->trans("Product");
print '<option value="1"';
if (1 == $selected) print ' selected="selected"';
if (1 == $selected) print ' selected';
print '>'.$langs->trans("Service");
print '</select>';
@ -773,14 +773,14 @@ class Form
if ($showempty)
{
print '<option value="-1"';
if ($selected == -1) print ' selected="selected"';
if ($selected == -1) print ' selected';
print '>&nbsp;</option>';
}
foreach($this->cache_types_fees as $key => $value)
{
print '<option value="'.$key.'"';
if ($key == $selected) print ' selected="selected"';
if ($key == $selected) print ' selected';
print '>';
print $value;
print '</option>';
@ -972,7 +972,7 @@ class Form
}
if ($selected > 0 && $selected == $obj->rowid)
{
$out.= '<option value="'.$obj->rowid.'" selected="selected">'.$label.'</option>';
$out.= '<option value="'.$obj->rowid.'" selected>'.$label.'</option>';
}
else
{
@ -1042,7 +1042,7 @@ class Form
if ($desc=='(DEPOSIT)') $desc=$langs->trans("Deposit");
$selectstring='';
if ($selected > 0 && $selected == $obj->rowid) $selectstring=' selected="selected"';
if ($selected > 0 && $selected == $obj->rowid) $selectstring=' selected';
$disabled='';
if ($maxvalue > 0 && $obj->amount_ttc > $maxvalue)
@ -1138,8 +1138,8 @@ class Form
}
if ($htmlname != 'none' || $options_only) $out.= '<select class="flat'.($moreclass?' '.$moreclass:'').'" id="'.$htmlname.'" name="'.$htmlname.'"'.$nodatarole.'>';
if ($showempty == 1) $out.= '<option value="0"'.($selected=='0'?' selected="selected"':'').'></option>';
if ($showempty == 2) $out.= '<option value="0"'.($selected=='0'?' selected="selected"':'').'>'.$langs->trans("Internal").'</option>';
if ($showempty == 1) $out.= '<option value="0"'.($selected=='0'?' selected':'').'></option>';
if ($showempty == 2) $out.= '<option value="0"'.($selected=='0'?' selected':'').'>'.$langs->trans("Internal").'</option>';
$num = $this->db->num_rows($resql);
$i = 0;
if ($num)
@ -1164,7 +1164,7 @@ class Form
{
$out.= '<option value="'.$obj->rowid.'"';
if ($disabled) $out.= ' disabled';
$out.= ' selected="selected">';
$out.= ' selected>';
$out.= $contactstatic->getFullName($langs);
if ($showfunction && $obj->poste) $out.= ' ('.$obj->poste.')';
if (($showsoc > 0) && $obj->company) $out.= ' - ('.$obj->company.')';
@ -1196,7 +1196,7 @@ class Form
}
else
{
$out.= '<option value="-1"'.($showempty==2?'':' selected="selected"').' disabled>'.$langs->trans($socid?"NoContactDefinedForThirdParty":"NoContactDefined").'</option>';
$out.= '<option value="-1"'.($showempty==2?'':' selected').' disabled>'.$langs->trans($socid?"NoContactDefinedForThirdParty":"NoContactDefined").'</option>';
}
if ($htmlname != 'none' || $options_only)
{
@ -1333,8 +1333,8 @@ class Form
}
$out.= '<select class="flat minwidth200" id="'.$htmlname.'" name="'.$htmlname.'"'.($disabled?' disabled':'').$nodatarole.'>';
if ($show_empty) $out.= '<option value="-1"'.((empty($selected) || $selected==-1)?' selected="selected"':'').'>&nbsp;</option>'."\n";
if ($show_every) $out.= '<option value="-2"'.(($selected==-2)?' selected="selected"':'').'>-- '.$langs->trans("Everybody").' --</option>'."\n";
if ($show_empty) $out.= '<option value="-1"'.((empty($selected) || $selected==-1)?' selected':'').'>&nbsp;</option>'."\n";
if ($show_every) $out.= '<option value="-2"'.(($selected==-2)?' selected':'').'>-- '.$langs->trans("Everybody").' --</option>'."\n";
$userstatic=new User($this->db);
@ -1353,7 +1353,7 @@ class Form
{
$out.= '<option value="'.$obj->rowid.'"';
if ($disableline) $out.= ' disabled';
$out.= ' selected="selected">';
$out.= ' selected>';
}
else
{
@ -1650,7 +1650,7 @@ class Form
$num = $this->db->num_rows($result);
$out.='<select class="flat" name="'.$htmlname.'" id="'.$htmlname.'" autofocus>';
$out.='<option value="0" selected="selected">&nbsp;</option>';
$out.='<option value="0" selected>&nbsp;</option>';
$i = 0;
while ($num && $i < $num)
@ -1773,7 +1773,7 @@ class Form
$outtype=$objp->fk_product_type;
$opt = '<option value="'.$objp->rowid.'"';
$opt.= ($objp->rowid == $selected)?' selected="selected"':'';
$opt.= ($objp->rowid == $selected)?' selected':'';
$opt.= (!empty($objp->price_by_qty_rowid) && $objp->price_by_qty_rowid > 0)?' pbq="'.$objp->price_by_qty_rowid.'"':'';
if (! empty($conf->stock->enabled) && $objp->fk_product_type == 0 && isset($objp->stock))
{
@ -2033,7 +2033,7 @@ class Form
//$out.='<select class="flat" id="select'.$htmlname.'" name="'.$htmlname.'">'; // remove select to have id same with combo and ajax
$out.='<select class="flat" id="'.$htmlname.'" name="'.$htmlname.'">';
if (! $selected) $out.='<option value="0" selected="selected">&nbsp;</option>';
if (! $selected) $out.='<option value="0" selected>&nbsp;</option>';
else $out.='<option value="0">&nbsp;</option>';
$i = 0;
@ -2048,7 +2048,7 @@ class Form
$outdiscount=0;
$opt = '<option value="'.$objp->idprodfournprice.'"';
if ($selected && $selected == $objp->idprodfournprice) $opt.= ' selected="selected"';
if ($selected && $selected == $objp->idprodfournprice) $opt.= ' selected';
if (empty($objp->idprodfournprice)) $opt.=' disabled';
$opt.= '>';
@ -2207,7 +2207,7 @@ class Form
$opt = '<option value="'.$objp->idprodfournprice.'"';
//if there is only one supplier, preselect it
if($num == 1) {
$opt .= ' selected="selected"';
$opt .= ' selected';
}
$opt.= '>'.$objp->name.' - '.$objp->ref_fourn.' - ';
@ -2293,7 +2293,7 @@ class Form
if ($selected && $selected == $obj->rowid)
{
print '<option value="'.$obj->rowid.'" selected="selected">'.$obj->label.'</option>';
print '<option value="'.$obj->rowid.'" selected>'.$obj->label.'</option>';
}
else
{
@ -2411,7 +2411,7 @@ class Form
{
if ($selected == $id)
{
print '<option value="'.$id.'" selected="selected">';
print '<option value="'.$id.'" selected>';
}
else
{
@ -2485,14 +2485,14 @@ class Form
$this->loadCacheInputReason();
print '<select class="flat" name="'.$htmlname.'">';
if ($addempty) print '<option value="0"'.(empty($selected)?' selected="selected"':'').'>&nbsp;</option>';
if ($addempty) print '<option value="0"'.(empty($selected)?' selected':'').'>&nbsp;</option>';
foreach($this->cache_demand_reason as $id => $arraydemandreason)
{
if ($arraydemandreason['code']==$exclude) continue;
if ($selected && ($selected == $arraydemandreason['id'] || $selected == $arraydemandreason['code']))
{
print '<option value="'.$arraydemandreason['id'].'" selected="selected">';
print '<option value="'.$arraydemandreason['id'].'" selected>';
}
else
{
@ -2568,7 +2568,7 @@ class Form
{
if ($selected == $id)
{
print '<option value="'.$id.'" selected="selected">';
print '<option value="'.$id.'" selected>';
}
else
{
@ -2622,8 +2622,8 @@ class Form
if ($format == 2) print '<option value="'.$arraytypes['code'].'"';
if ($format == 3) print '<option value="'.$id.'"';
// Si selected est text, on compare avec code, sinon avec id
if (preg_match('/[a-z]/i', $selected) && $selected == $arraytypes['code']) print ' selected="selected"';
elseif ($selected == $id) print ' selected="selected"';
if (preg_match('/[a-z]/i', $selected) && $selected == $arraytypes['code']) print ' selected';
elseif ($selected == $id) print ' selected';
print '>';
if ($format == 0) $value=($maxlength?dol_trunc($arraytypes['label'],$maxlength):$arraytypes['label']);
if ($format == 1) $value=$arraytypes['code'];
@ -2672,7 +2672,7 @@ class Form
{
if ($selected == $id)
{
$return.= '<option value="'.$id.'" selected="selected">'.$value;
$return.= '<option value="'.$id.'" selected>'.$value;
}
else
{
@ -2721,7 +2721,7 @@ class Form
while ($i < $num) {
$obj = $this->db->fetch_object($result);
if ($selected == $obj->rowid) {
print '<option value="'.$obj->rowid.'" selected="selected">';
print '<option value="'.$obj->rowid.'" selected>';
} else {
print '<option value="'.$obj->rowid.'">';
}
@ -2788,7 +2788,7 @@ class Form
$langs->load('bills');
$opt = '<option value ="" selected="selected"></option>';
$opt = '<option value ="" selected></option>';
$sql = 'SELECT rowid, facnumber, situation_cycle_ref, situation_counter, situation_final, fk_soc FROM ' . MAIN_DB_PREFIX . 'facture WHERE situation_counter>=1';
$sql .= ' order by situation_cycle_ref, situation_counter desc';
$resql = $this->db->query($sql);
@ -2807,7 +2807,7 @@ class Form
//Not prov?
if (substr($res[1], 1, 4) != 'PROV') {
if ($selected == $res[0]) {
$opt .= '<option value="' . $res[0] . '" selected="selected">' . $res[1] . '</option>';
$opt .= '<option value="' . $res[0] . '" selected>' . $res[1] . '</option>';
} else {
$opt .= '<option value="' . $res[0] . '">' . $res[1] . '</option>';
}
@ -2819,8 +2819,8 @@ class Form
} else {
dol_syslog("Error sql=" . $sql . ", error=" . $this->error, LOG_ERR);
}
if ($opt == '<option value ="" selected="selected"></option>') {
$opt = '<option value ="0" selected="selected">' . $langs->trans('NoSituations') . '</option>';
if ($opt == '<option value ="" selected></option>') {
$opt = '<option value ="0" selected>' . $langs->trans('NoSituations') . '</option>';
}
return $opt;
}
@ -2851,7 +2851,7 @@ class Form
{
if ($selected == $res[0])
{
$return.='<option value="'.$res->code.'" selected="selected">'.$langs->trans($res->label).'</option>';
$return.='<option value="'.$res->code.'" selected>'.$langs->trans($res->label).'</option>';
}
else
{
@ -2906,7 +2906,7 @@ class Form
$obj = $this->db->fetch_object($result);
if ($selected == $obj->rowid)
{
print '<option value="'.$obj->rowid.'" selected="selected">';
print '<option value="'.$obj->rowid.'" selected>';
}
else
{
@ -2995,7 +2995,7 @@ class Form
{
if ($cate_arbo[$key]['id'] == $selected || ($selected == 'auto' && count($cate_arbo) == 1))
{
$add = 'selected="selected" ';
$add = 'selected ';
}
else
{
@ -3774,7 +3774,7 @@ class Form
{
if ($selected && $selected == $code_iso)
{
$out.= '<option value="'.$code_iso.'" selected="selected">';
$out.= '<option value="'.$code_iso.'" selected>';
}
else
{
@ -3967,7 +3967,7 @@ class Form
$return.= '"';
if ($rate['txtva'] == $defaulttx && $rate['nprtva'] == $defaultnpr)
{
$return.= ' selected="selected"';
$return.= ' selected';
}
$return.= '>'.vatrate($rate['libtva']);
$return.= $rate['nprtva'] ? ' *': '';
@ -4116,12 +4116,12 @@ class Form
if ($emptydate || $set_time == -1)
{
$retstring.='<option value="0" selected="selected">&nbsp;</option>';
$retstring.='<option value="0" selected>&nbsp;</option>';
}
for ($day = 1 ; $day <= 31; $day++)
{
$retstring.='<option value="'.$day.'"'.($day == $sday ? ' selected="selected"':'').'>'.$day.'</option>';
$retstring.='<option value="'.$day.'"'.($day == $sday ? ' selected':'').'>'.$day.'</option>';
}
$retstring.="</select>";
@ -4129,13 +4129,13 @@ class Form
$retstring.='<select'.($disabled?' disabled':'').' class="flat" name="'.$prefix.'month">';
if ($emptydate || $set_time == -1)
{
$retstring.='<option value="0" selected="selected">&nbsp;</option>';
$retstring.='<option value="0" selected>&nbsp;</option>';
}
// Month
for ($month = 1 ; $month <= 12 ; $month++)
{
$retstring.='<option value="'.$month.'"'.($month == $smonth?' selected="selected"':'').'>';
$retstring.='<option value="'.$month.'"'.($month == $smonth?' selected':'').'>';
$retstring.=dol_print_date(mktime(12,0,0,$month,1,2000),"%b");
$retstring.="</option>";
}
@ -4152,7 +4152,7 @@ class Form
for ($year = $syear - 5; $year < $syear + 10 ; $year++)
{
$retstring.='<option value="'.$year.'"'.($year == $syear ? ' selected="true"':'').'>'.$year.'</option>';
$retstring.='<option value="'.$year.'"'.($year == $syear ? ' selected':'').'>'.$year.'</option>';
}
$retstring.="</select>\n";
}
@ -4169,7 +4169,7 @@ class Form
for ($hour = 0; $hour < 24; $hour++)
{
if (strlen($hour) < 2) $hour = "0" . $hour;
$retstring.='<option value="'.$hour.'"'.(($hour == $shour)?' selected="true"':'').'>'.$hour.(empty($conf->dol_optimize_smallscreen)?'':'H').'</option>';
$retstring.='<option value="'.$hour.'"'.(($hour == $shour)?' selected':'').'>'.$hour.(empty($conf->dol_optimize_smallscreen)?'':'H').'</option>';
}
$retstring.='</select>';
if (empty($conf->dol_optimize_smallscreen)) $retstring.=":";
@ -4183,7 +4183,7 @@ class Form
for ($min = 0; $min < 60 ; $min++)
{
if (strlen($min) < 2) $min = "0" . $min;
$retstring.='<option value="'.$min.'"'.(($min == $smin)?' selected="true"':'').'>'.$min.(empty($conf->dol_optimize_smallscreen)?'':'').'</option>';
$retstring.='<option value="'.$min.'"'.(($min == $smin)?' selected':'').'>'.$min.(empty($conf->dol_optimize_smallscreen)?'':'').'</option>';
}
$retstring.='</select>';
}
@ -4270,7 +4270,7 @@ class Form
$retstring.='<option value="'.$hour.'"';
if ($hourSelected == $hour)
{
$retstring.=" selected=\"true\"";
$retstring.=" selected";
}
$retstring.=">".$hour."</option>";
}
@ -4293,7 +4293,7 @@ class Form
for ($min = 0; $min <= 55; $min=$min+5)
{
$retstring.='<option value="'.$min.'"';
if ($minSelected == $min) $retstring.=' selected="selected"';
if ($minSelected == $min) $retstring.=' selected';
$retstring.='>'.$min.'</option>';
}
$retstring.="</select>";
@ -4361,7 +4361,7 @@ class Form
{
$textforempty=' ';
if (! empty($conf->use_javascript_ajax)) $textforempty='&nbsp;'; // If we use ajaxcombo, we need &nbsp; here to avoid to have an empty element that is too small.
$out.='<option value="-1"'.($id==-1?' selected="selected"':'').'>'.$textforempty.'</option>'."\n";
$out.='<option value="-1"'.($id==-1?' selected':'').'>'.$textforempty.'</option>'."\n";
}
if (is_array($array))
@ -4379,7 +4379,7 @@ class Form
foreach($array as $key => $value)
{
$out.='<option value="'.$key.'"';
if ($id != '' && $id == $key) $out.=' selected="selected"'; // To preselect a value
if ($id != '' && $id == $key) $out.=' selected'; // To preselect a value
$out.='>';
if ($key_in_label)
@ -4476,7 +4476,7 @@ class Form
$out.= '<option value="'.$key.'"';
if (is_array($selected) && ! empty($selected) && in_array($key, $selected))
{
$out.= ' selected="selected"';
$out.= ' selected';
}
$out.= '>';
@ -4560,15 +4560,15 @@ class Form
$disabled = ($disabled ? ' disabled' : '');
$resultyesno = '<select class="flat" id="'.$htmlname.'" name="'.$htmlname.'"'.$disabled.'>'."\n";
if ($useempty) $resultyesno .= '<option value="-1"'.(($value < 0)?' selected="selected"':'').'></option>'."\n";
if ($useempty) $resultyesno .= '<option value="-1"'.(($value < 0)?' selected':'').'></option>'."\n";
if (("$value" == 'yes') || ($value == 1))
{
$resultyesno .= '<option value="'.$yes.'" selected="selected">'.$langs->trans("Yes").'</option>'."\n";
$resultyesno .= '<option value="'.$yes.'" selected>'.$langs->trans("Yes").'</option>'."\n";
$resultyesno .= '<option value="'.$no.'">'.$langs->trans("No").'</option>'."\n";
}
else
{
$selected=(($useempty && $value != '0' && $value != 'no')?'':' selected="selected"');
$selected=(($useempty && $value != '0' && $value != 'no')?'':' selected');
$resultyesno .= '<option value="'.$yes.'">'.$langs->trans("Yes").'</option>'."\n";
$resultyesno .= '<option value="'.$no.'"'.$selected.'>'.$langs->trans("No").'</option>'."\n";
}
@ -4610,7 +4610,7 @@ class Form
$obj = $this->db->fetch_object($result);
if ($selected == $obj->rowid)
{
print '<option value="'.$obj->rowid.'" selected="selected">';
print '<option value="'.$obj->rowid.'" selected>';
}
else
{
@ -4857,7 +4857,7 @@ class Form
$i = 0;
if ($num)
{
if ($show_empty) $out.= '<option value="-1"'.($selected==-1?' selected="selected"':'').'>&nbsp;</option>'."\n";
if ($show_empty) $out.= '<option value="-1"'.($selected==-1?' selected':'').'>&nbsp;</option>'."\n";
while ($i < $num)
{
@ -4869,7 +4869,7 @@ class Form
if ($disableline) $out.= ' disabled';
if ((is_object($selected) && $selected->id == $obj->rowid) || (! is_object($selected) && $selected == $obj->rowid))
{
$out.= ' selected="selected"';
$out.= ' selected';
}
$out.= '>';
@ -4885,7 +4885,7 @@ class Form
}
else
{
if ($show_empty) $out.= '<option value="-1"'.($selected==-1?' selected="selected"':'').'></option>'."\n";
if ($show_empty) $out.= '<option value="-1"'.($selected==-1?' selected':'').'></option>'."\n";
$out.= '<option value="" disabled>'.$langs->trans("NoUserGroupDefined").'</option>';
}
$out.= '</select>';

View File

@ -121,13 +121,13 @@ class FormActions
//var_dump($selected);
if ($selected == 'done') $selected='100';
print '<select '.($canedit?'':'disabled ').'name="'.$htmlname.'" id="select'.$htmlname.'" class="flat">';
if ($showempty) print '<option value=""'.($selected == ''?' selected="selected"':'').'></option>';
if ($showempty) print '<option value=""'.($selected == ''?' selected':'').'></option>';
foreach($listofstatus as $key => $val)
{
print '<option value="'.$key.'"'.(($selected == $key && strlen($selected) == strlen($key)) || (($selected > 0 && $selected < 100) && $key == '50') ? ' selected="selected"' : '').'>'.$val.'</option>';
print '<option value="'.$key.'"'.(($selected == $key && strlen($selected) == strlen($key)) || (($selected > 0 && $selected < 100) && $key == '50') ? ' selected' : '').'>'.$val.'</option>';
if ($key == '50' && $onlyselect == 2)
{
print '<option value="todo"'.($selected == 'todo' ? ' selected="selected"' : '').'>'.$langs->trans("ActionUncomplete").' ('.$langs->trans("ActionRunningNotStarted")."+".$langs->trans("ActionRunningShort").')</option>';
print '<option value="todo"'.($selected == 'todo' ? ' selected' : '').'>'.$langs->trans("ActionUncomplete").' ('.$langs->trans("ActionRunningNotStarted")."+".$langs->trans("ActionRunningShort").')</option>';
}
}
print '</select>';

View File

@ -68,13 +68,13 @@ class FormAdmin
if ($showempty)
{
$out.= '<option value=""';
if ($selected == '') $out.= ' selected="selected"';
if ($selected == '') $out.= ' selected';
$out.= '>&nbsp;</option>';
}
if ($showauto)
{
$out.= '<option value="auto"';
if ($selected == 'auto') $out.= ' selected="selected"';
if ($selected == 'auto') $out.= ' selected';
$out.= '>'.$langs->trans("AutoDetectLang").'</option>';
}
@ -96,7 +96,7 @@ class FormAdmin
}
else if ($selected == $key)
{
$out.= '<option value="'.$key.'" selected="selected">'.$value.'</option>';
$out.= '<option value="'.$key.'" selected>'.$value.'</option>';
}
else
{
@ -157,7 +157,7 @@ class FormAdmin
if ($file == $selected)
{
$menuarray[$prefix.'_'.$file]='<option value="'.$file.'" selected="selected">'.$filelib.'</option>';
$menuarray[$prefix.'_'.$file]='<option value="'.$file.'" selected>'.$filelib.'</option>';
}
else
{
@ -257,7 +257,7 @@ class FormAdmin
print '<option value="'.$key.'"';
if ($key == $selected)
{
print ' selected="selected"';
print ' selected';
}
print '>';
if ($key == 'all') print $langs->trans("AllMenus");
@ -312,7 +312,7 @@ class FormAdmin
foreach ($arraytz as $lib => $gmt)
{
print '<option value="'.$lib.'"';
if ($selected == $lib || $selected == $gmt) print ' selected="selected"';
if ($selected == $lib || $selected == $gmt) print ' selected';
print '>'.$gmt.'</option>'."\n";
}
print '</select>';
@ -366,14 +366,14 @@ class FormAdmin
if ($showempty)
{
$out.= '<option value=""';
if ($selected == '') $out.= ' selected="selected"';
if ($selected == '') $out.= ' selected';
$out.= '>&nbsp;</option>';
}
foreach ($paperformat as $key => $value)
{
if ($selected == $key)
{
$out.= '<option value="'.$key.'" selected="selected">'.$value.'</option>';
$out.= '<option value="'.$key.'" selected>'.$value.'</option>';
}
else
{

View File

@ -71,7 +71,7 @@ class FormAskPriceSupplier
$obj = $this->db->fetch_object($resql);
if ($selected == $obj->id)
{
print '<option value="'.$obj->id.'" selected="selected">';
print '<option value="'.$obj->id.'" selected>';
}
else
{

View File

@ -65,7 +65,7 @@ class FormBank
{
if ($selected == $type_available[$i])
{
print '<option value="'.$type_available[$i].'" selected="selected">'.$langs->trans("BankType".$type_available[$i]).'</option>';
print '<option value="'.$type_available[$i].'" selected>'.$langs->trans("BankType".$type_available[$i]).'</option>';
}
else
{

View File

@ -85,11 +85,11 @@ class FormBarCode
$select_encoder.= '<input type="hidden" name="action" value="update">';
$select_encoder.= '<input type="hidden" name="code_id" value="'.$code_id.'">';
$select_encoder.= '<select id="select'.$idForm.'" class="flat" name="coder">';
$select_encoder.= '<option value="0"'.($selected==0?' selected="selected"':'').' '.$disable.'>'.$langs->trans('Disable').'</option>';
$select_encoder.= '<option value="0"'.($selected==0?' selected':'').' '.$disable.'>'.$langs->trans('Disable').'</option>';
$select_encoder.= '<option value="-1" disabled>--------------------</option>';
foreach($barcodelist as $key => $value)
{
$select_encoder.= '<option value="'.$key.'"'.($selected==$key?' selected="selected"':'').'>'.$value.'</option>';
$select_encoder.= '<option value="'.$key.'"'.($selected==$key?' selected':'').'>'.$value.'</option>';
}
$select_encoder.= '</select></form>';
@ -129,7 +129,7 @@ class FormBarCode
{
$langs->load("errors");
print '<select disabled class="flat" name="'.$htmlname.'" id="select_'.$htmlname.'">';
print '<option value="0" selected="selected">'.$langs->trans('ErrorNoActivatedBarcode').'</option>';
print '<option value="0" selected>'.$langs->trans('ErrorNoActivatedBarcode').'</option>';
}
while ($i < $num)
@ -137,7 +137,7 @@ class FormBarCode
$obj = $this->db->fetch_object($result);
if ($selected == $obj->rowid)
{
print '<option value="'.$obj->rowid.'" selected="selected">';
print '<option value="'.$obj->rowid.'" selected>';
}
else
{

View File

@ -164,7 +164,7 @@ class FormCompany
$obj = $this->db->fetch_object($resql);
print '<option value="'.$obj->code.'"';
if ($selected == $obj->code) print ' selected="selected"';
if ($selected == $obj->code) print ' selected';
print '>';
$level=$langs->trans($obj->code);
if ($level == $obj->code) $level=$langs->trans($obj->label);
@ -263,7 +263,7 @@ class FormCompany
if ((! empty($selected) && $selected == $obj->rowid)
|| (empty($selected) && ! empty($conf->global->MAIN_FORCE_DEFAULT_STATE_ID) && $conf->global->MAIN_FORCE_DEFAULT_STATE_ID == $obj->rowid))
{
$out.= '<option value="'.$obj->rowid.'" selected="selected">';
$out.= '<option value="'.$obj->rowid.'" selected>';
}
else
{
@ -336,7 +336,7 @@ class FormCompany
if ($selected > 0 && $selected == $obj->code)
{
print '<option value="'.$obj->code.'" selected="selected">'.$obj->label.'</option>';
print '<option value="'.$obj->code.'" selected>'.$obj->label.'</option>';
}
else
{
@ -386,7 +386,7 @@ class FormCompany
$obj = $this->db->fetch_object($resql);
if ($selected == $obj->code)
{
$out.= '<option value="'.$obj->code.'" selected="selected">';
$out.= '<option value="'.$obj->code.'" selected>';
}
else
{
@ -495,7 +495,7 @@ class FormCompany
if ($selected > 0 && $selected == $val['code'])
{
$out.= '<option value="'.$val['code'].'" selected="selected">';
$out.= '<option value="'.$val['code'].'" selected>';
}
else
{
@ -648,7 +648,7 @@ class FormCompany
{
print '<option value="'.$obj->rowid.'"';
if ($disabled) print ' disabled';
print ' selected="selected">'.dol_trunc($obj->name,24).'</option>';
print ' selected>'.dol_trunc($obj->name,24).'</option>';
$firstCompany = $obj->rowid;
}
else
@ -799,7 +799,7 @@ class FormCompany
{
if ($selected == $valors[$i])
{
print '<option value="'.$valors[$i].'" selected="selected">';
print '<option value="'.$valors[$i].'" selected>';
}
else
{

View File

@ -92,7 +92,7 @@ class FormContract
//else $labeltoshow.=' ('.$langs->trans("Private").')';
if (!empty($selected) && $selected == $obj->rowid && $obj->statut > 0)
{
print '<option value="'.$obj->rowid.'" selected="selected">'.$labeltoshow.'</option>';
print '<option value="'.$obj->rowid.'" selected>'.$labeltoshow.'</option>';
}
else
{

View File

@ -60,12 +60,12 @@ class FormCron extends Form
if ($selected=='command') {
$out= $langs->trans('CronType_command');
$out.='<SELECT name="'.$htmlname.'" id="'.$htmlname.'" style="display:none"/>';
$out.= '<OPTION value="command" selected=\"selected\">'.$langs->trans('CronType_command').'</OPTION>';
$out.= '<OPTION value="command" selected>'.$langs->trans('CronType_command').'</OPTION>';
$out.='</SELECT>';
} elseif ($selected=='method') {
$out= $langs->trans('CronType_method');
$out.='<SELECT name="'.$htmlname.'" id="'.$htmlname.'" style="display:none"/>';
$out.= '<OPTION value="method" selected=\"selected\">'.$langs->trans('CronType_method').'</OPTION>';
$out.= '<OPTION value="method" selected>'.$langs->trans('CronType_method').'</OPTION>';
$out.='</SELECT>';
}
}else {
@ -73,14 +73,14 @@ class FormCron extends Form
$out='<SELECT class="flat" name="'.$htmlname.'" id="'.$htmlname.'" />';
if ($selected=='command') {
$selected_attr=' selected=\"selected\" ';
$selected_attr=' selected ';
} else {
$selected_attr='';
}
$out.= '<OPTION value="command" '.$selected_attr.'>'.$langs->trans('CronType_command').'</OPTION>';
if ($selected=='method') {
$selected_attr=' selected=\"selected\" ';
$selected_attr=' selected ';
} else {
$selected_attr='';
}

View File

@ -93,7 +93,7 @@ class FormIntervention
$labeltoshow=dol_trunc($obj->ref,18);
if (!empty($selected) && $selected == $obj->rowid && $obj->statut > 0)
{
$out.='<option value="'.$obj->rowid.'" selected="selected">'.$labeltoshow.'</option>';
$out.='<option value="'.$obj->rowid.'" selected>'.$labeltoshow.'</option>';
}
else
{

View File

@ -71,7 +71,7 @@ class FormMailing extends Form
foreach($mailing->statut_dest as $id=>$status) {
if ($selectedid==$id) {
$selected=" selected=selected ";
$selected=" selected ";
}else {
$selected="";
}
@ -81,4 +81,4 @@ class FormMailing extends Form
$out .= '</select>';
return $out;
}
}
}

View File

@ -61,7 +61,7 @@ class FormOrder
foreach($statustohow as $key => $value)
{
print '<option value="'.$value.'"'.(($selected == $key || $selected == $value)?' selected="selected"':'').'>';
print '<option value="'.$value.'"'.(($selected == $key || $selected == $value)?' selected':'').'>';
print CommandeFournisseur::LibStatut($key,$short);
print '</option>';
}
@ -80,16 +80,16 @@ class FormOrder
{
global $conf,$langs;
print '<select class="flat" name="'.$htmlname.'">';
if ($addempty) print '<option value="-1" selected="selected">&nbsp;</option>';
if ($addempty) print '<option value="-1" selected>&nbsp;</option>';
// TODO Use a table called llx_c_input_reason
print '<option value="0"'.($selected=='0'?' selected="selected"':'').'>'.$langs->trans('OrderSource0').'</option>';
print '<option value="1"'.($selected=='1'?' selected="selected"':'').'>'.$langs->trans('OrderSource1').'</option>';
print '<option value="2"'.($selected=='2'?' selected="selected"':'').'>'.$langs->trans('OrderSource2').'</option>';
print '<option value="3"'.($selected=='3'?' selected="selected"':'').'>'.$langs->trans('OrderSource3').'</option>';
print '<option value="4"'.($selected=='4'?' selected="selected"':'').'>'.$langs->trans('OrderSource4').'</option>';
print '<option value="5"'.($selected=='5'?' selected="selected"':'').'>'.$langs->trans('OrderSource5').'</option>';
print '<option value="6"'.($selected=='6'?' selected="selected"':'').'>'.$langs->trans('OrderSource6').'</option>';
print '<option value="0"'.($selected=='0'?' selected':'').'>'.$langs->trans('OrderSource0').'</option>';
print '<option value="1"'.($selected=='1'?' selected':'').'>'.$langs->trans('OrderSource1').'</option>';
print '<option value="2"'.($selected=='2'?' selected':'').'>'.$langs->trans('OrderSource2').'</option>';
print '<option value="3"'.($selected=='3'?' selected':'').'>'.$langs->trans('OrderSource3').'</option>';
print '<option value="4"'.($selected=='4'?' selected':'').'>'.$langs->trans('OrderSource4').'</option>';
print '<option value="5"'.($selected=='5'?' selected':'').'>'.$langs->trans('OrderSource5').'</option>';
print '<option value="6"'.($selected=='6'?' selected':'').'>'.$langs->trans('OrderSource6').'</option>';
print '</select>';
}

View File

@ -85,7 +85,7 @@ class FormOther
$obj = $this->db->fetch_object($result);
if ($selected == $obj->rowid)
{
print '<option value="'.$obj->rowid.'" selected="selected">';
print '<option value="'.$obj->rowid.'" selected>';
}
else
{
@ -134,7 +134,7 @@ class FormOther
$obj = $this->db->fetch_object($result);
if ($selected == $obj->rowid)
{
print '<option value="'.$obj->rowid.'" selected="selected">';
print '<option value="'.$obj->rowid.'" selected>';
}
else
{
@ -184,7 +184,7 @@ class FormOther
$obj = $this->db->fetch_object($resql);
if ($selected && $selected == $obj->rowid)
{
print '<option value="'.$obj->rowid.'" selected="selected">';
print '<option value="'.$obj->rowid.'" selected>';
}
else
{
@ -242,7 +242,7 @@ class FormOther
$obj = $this->db->fetch_object($resql);
if (($selected && $selected == $obj->taux) || $num == 1)
{
$out.='<option value="'.$obj->taux.'" selected="selected">';
$out.='<option value="'.$obj->taux.'" selected>';
}
else
{
@ -284,7 +284,7 @@ class FormOther
{
if ($selected == $i)
{
$return.= '<option value="'.$i.'" selected="selected">';
$return.= '<option value="'.$i.'" selected>';
}
else
{
@ -338,14 +338,14 @@ class FormOther
foreach ($tab_categs as $categ)
{
$moreforfilter.='<option value="'.$categ['id'].'"';
if ($categ['id'] == $selected) $moreforfilter.=' selected="selected"';
if ($categ['id'] == $selected) $moreforfilter.=' selected';
$moreforfilter.='>'.dol_trunc($categ['fulllabel'],50,'middle').'</option>';
}
}
if ($nocateg)
{
$langs->load("categories");
$moreforfilter.='<option value="-2"'.($selected == -2 ? ' selected="selected"':'').'>- '.$langs->trans("NotCategorized").' -</option>';
$moreforfilter.='<option value="-2"'.($selected == -2 ? ' selected':'').'>- '.$langs->trans("NotCategorized").' -</option>';
}
$moreforfilter.='</select>';
@ -412,7 +412,7 @@ class FormOther
$out.='<option value="'.$obj_usr->rowid.'"';
if ($obj_usr->rowid == $selected) $out.=' selected="selected"';
if ($obj_usr->rowid == $selected) $out.=' selected';
$out.='>';
$out.=dolGetFirstLastname($obj_usr->firstname,$obj_usr->lastname);
@ -521,7 +521,7 @@ class FormOther
{
if ($i > 0) print '<option value="0" disabled>----------</option>';
print '<option value="'.$lines[$i]->fk_project.'_0"';
if ($selectedproject == $lines[$i]->fk_project) print ' selected="selected"';
if ($selectedproject == $lines[$i]->fk_project) print ' selected';
print '>'; // Project -> Task
print $langs->trans("Project").' '.$lines[$i]->projectref;
if (empty($lines[$i]->public))
@ -554,7 +554,7 @@ class FormOther
}
print '<option value="'.$lines[$i]->fk_project.'_'.$lines[$i]->id.'"';
if (($lines[$i]->id == $selectedtask) || ($lines[$i]->fk_project.'_'.$lines[$i]->id == $selectedtask)) print ' selected="selected"';
if (($lines[$i]->id == $selectedtask) || ($lines[$i]->fk_project.'_'.$lines[$i]->id == $selectedtask)) print ' selected';
if ($disabled) print ' disabled';
print '>';
print $langs->trans("Project").' '.$lines[$i]->projectref;
@ -683,7 +683,7 @@ class FormOther
foreach ($arrayofcolors as $val)
{
$out.= '<option value="'.$val.'"';
if ($set_color == $val) $out.= ' selected="selected"';
if ($set_color == $val) $out.= ' selected';
$out.= '>'.$val.'</option>';
}
$out.= '</select>';
@ -760,7 +760,7 @@ class FormOther
{
if ($selected == $key)
{
$select_week .= '<option value="'.$key.'" selected="selected">';
$select_week .= '<option value="'.$key.'" selected>';
}
else
{
@ -799,7 +799,7 @@ class FormOther
{
if ($selected == $key)
{
$select_month .= '<option value="'.$key.'" selected="selected">';
$select_month .= '<option value="'.$key.'" selected>';
}
else
{
@ -855,7 +855,7 @@ class FormOther
if($useempty)
{
$selected_html='';
if ($selected == '') $selected_html = ' selected="selected"';
if ($selected == '') $selected_html = ' selected';
$out.= '<option value=""' . $selected_html . '>&nbsp;</option>';
}
if (! $invert)
@ -863,7 +863,7 @@ class FormOther
for ($y = $max_year; $y >= $min_year; $y--)
{
$selected_html='';
if ($selected > 0 && $y == $selected) $selected_html = ' selected="selected"';
if ($selected > 0 && $y == $selected) $selected_html = ' selected';
$out.= '<option value="'.$y.'"'.$selected_html.' >'.$y.'</option>';
}
}
@ -872,7 +872,7 @@ class FormOther
for ($y = $min_year; $y <= $max_year; $y++)
{
$selected_html='';
if ($selected > 0 && $y == $selected) $selected_html = ' selected="selected"';
if ($selected > 0 && $y == $selected) $selected_html = ' selected';
$out.= '<option value="'.$y.'"'.$selected_html.' >'.$y.'</option>';
}
}
@ -1188,7 +1188,7 @@ class FormOther
$obj = $this->db->fetch_object($result);
if ($selected == $obj->rowid || $selected == $obj->$keyfield)
{
print '<option value="'.$obj->$keyfield.'" selected="selected">';
print '<option value="'.$obj->$keyfield.'" selected>';
}
else
{

View File

@ -149,7 +149,7 @@ class FormProjets
if (!empty($selected) && $selected == $obj->rowid && $obj->fk_statut > 0)
{
$out.= '<option value="'.$obj->rowid.'" selected="selected">'.$labeltoshow.'</option>';
$out.= '<option value="'.$obj->rowid.'" selected>'.$labeltoshow.'</option>';
}
else
{

View File

@ -71,7 +71,7 @@ class FormPropal
$obj = $this->db->fetch_object($resql);
if ($selected == $obj->id)
{
print '<option value="'.$obj->id.'" selected="selected">';
print '<option value="'.$obj->id.'" selected>';
}
else
{

View File

@ -307,13 +307,13 @@ function limitChars(textarea, limit, infodiv)
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3" selected="selected">3</option>
<option value="3" selected>3</option>
</select></td></tr>
<tr><td>'.$langs->trans("Type").' :</td><td>
<select name="class" id="valid" class="flat">
<option value="0">Flash</option>
<option value="1" selected="selected">Standard</option>
<option value="1" selected>Standard</option>
<option value="2">SIM</option>
<option value="3">ToolKit</option>
</select></td></tr>';

View File

@ -94,7 +94,7 @@ class FormSocialContrib
{
$obj = $db->fetch_object($resql);
print '<option value="'.$obj->id.'"';
if ($obj->id == $selected) print ' selected="selected"';
if ($obj->id == $selected) print ' selected';
print '>'.dol_trunc($obj->type,$maxlen);
$i++;
}

View File

@ -357,7 +357,7 @@ if (($action=="create") || ($action=="edit"))
{
if (! empty($object->unitfrequency) && ($object->frequency/$object->unitfrequency) == $i)
{
print "<option value='".$i."' selected='selected'>".$i."</option>";
print "<option value='".$i."' selected>".$i."</option>";
}
else
{

View File

@ -72,7 +72,7 @@ class FormEcm
{
if ($cate_arbo[$key]['id'] == $selected)
{
$add = 'selected="selected" ';
$add = 'selected ';
}
else
{

View File

@ -1739,7 +1739,7 @@ else
$defaultvat=-1;
if (! empty($conf->global->EXPENSEREPORT_NO_DEFAULT_VAT)) $conf->global->MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS = 'none';
print '<select class="flat" name="vatrate">';
print '<option name="none" value="" selected="selected">';
print '<option name="none" value="" selected>';
print $form->load_tva('vatrate', (isset($_POST["vatrate"])?$_POST["vatrate"]:$defaultvat), $mysoc, '', 0, 0, '', true);
print '</select>';
print '</td>';

View File

@ -1710,7 +1710,7 @@ function select_expensereport_statut($selected='',$htmlname='fk_statut',$useempt
{
if ($selected != '' && $selected == $key)
{
print '<option value="'.$key.'" selected="true">';
print '<option value="'.$key.'" selected>';
}
else
{
@ -1739,7 +1739,7 @@ function select_type_fees_id($selected='',$htmlname='type',$showempty=0)
if ($showempty)
{
print '<option value="-1"';
if ($selected == -1) print ' selected="true"';
if ($selected == -1) print ' selected';
print '>&nbsp;</option>';
}
@ -1755,7 +1755,7 @@ function select_type_fees_id($selected='',$htmlname='type',$showempty=0)
{
$obj = $db->fetch_object($resql);
print '<option value="'.$obj->id.'"';
if ($obj->code == $selected || $obj->id == $selected) print ' selected="selected"';
if ($obj->code == $selected || $obj->id == $selected) print ' selected';
print '>';
if ($obj->code != $langs->trans($obj->code)) print $langs->trans($obj->code);
else print $langs->trans($obj->type);
@ -1763,4 +1763,4 @@ function select_type_fees_id($selected='',$htmlname='type',$showempty=0)
}
}
print '</select>';
}
}

View File

@ -85,7 +85,7 @@ print '<select name="mois">';
for($i=1;$i<13;$i++) {
$mois = str_pad($i, 2, "0", STR_PAD_LEFT);
if($month == $mois) {
print '<option value="'.$mois.'" selected="selected">'.$mois.'</option>';
print '<option value="'.$mois.'" selected>'.$mois.'</option>';
} else {
print '<option value="'.$mois.'">'.$mois.'</option>';
}
@ -97,7 +97,7 @@ print '<select name="annee">';
for($i=2009;$i<$year+1;$i++) {
if($year == $i) {
print '<option value="'.$i.'" selected="selected">'.$i.'</option>';
print '<option value="'.$i.'" selected>'.$i.'</option>';
} else {
print '<option value="'.$i.'">'.$i.'</option>';
}

View File

@ -426,7 +426,7 @@ class Export
}
if (!empty($ValueField) && $ValueField == $obj->rowid)
{
$szFilterField.='<option value="'.$obj->rowid.'" selected="selected">'.$labeltoshow.'</option>';
$szFilterField.='<option value="'.$obj->rowid.'" selected>'.$labeltoshow.'</option>';
}
else
{

View File

@ -102,10 +102,10 @@ while($type = $db->fetch_array($types))
<div>
<label>' . $langs->trans('TypeAffect') . '</label>
<select name="affect">
<option value="1"'.($type['affect']?' selected="selected"':'').'>
<option value="1"'.($type['affect']?' selected':'').'>
'.$langs->trans('TypeAffectYes').'
</option>
<option value="0"'.($type['affect']?'':' selected="selected"').'>
<option value="0"'.($type['affect']?'':' selected').'>
'.$langs->trans('TypeAffectNo').'
</option>
</select>

View File

@ -749,7 +749,7 @@ class Holiday extends CommonObject
// Boucle des statuts
for($i=1; $i < $nb; $i++) {
if($i==$selected) {
$statut.= '<option value="'.$i.'" selected="selected">'.$langs->trans($name[$i-1]).'</option>'."\n";
$statut.= '<option value="'.$i.'" selected>'.$langs->trans($name[$i-1]).'</option>'."\n";
}
else {
$statut.= '<option value="'.$i.'">'.$langs->trans($name[$i-1]).'</option>'."\n";
@ -797,7 +797,7 @@ class Holiday extends CommonObject
while ($obj = $this->db->fetch_object($result))
{
if($groupe==$obj->rowid) {
$selectGroup.= '<option value="'.$obj->rowid.'" selected="selected">'.$obj->name.'</option>'."\n";
$selectGroup.= '<option value="'.$obj->rowid.'" selected>'.$obj->name.'</option>'."\n";
} else {
$selectGroup.= '<option value="'.$obj->rowid.'">'.$obj->name.'</option>'."\n";
}

View File

@ -322,7 +322,7 @@ if (! empty($force_install_message))
if ($type=='mssql') { $testfunction='mssql_connect'; $testclass=''; }
if ($type=='sqlite') { $testfunction=''; $testclass='PDO'; }
if ($type=='sqlite3') { $testfunction=''; $testclass='SQLite3'; }
$option.='<option value="'.$type.'"'.($defaultype == $type?' selected="selected"':'');
$option.='<option value="'.$type.'"'.($defaultype == $type?' selected':'');
if ($testfunction && ! function_exists($testfunction)) $option.=' disabled';
if ($testclass && ! class_exists($testclass)) $option.=' disabled';
$option.='>';

View File

@ -1092,13 +1092,13 @@ else
print '<select class="flat" name="statut">';
if ($object->status)
{
print '<option value="1" selected="selected">'.$langs->trans("OnSell").'</option>';
print '<option value="1" selected>'.$langs->trans("OnSell").'</option>';
print '<option value="0">'.$langs->trans("NotOnSell").'</option>';
}
else
{
print '<option value="1">'.$langs->trans("OnSell").'</option>';
print '<option value="0" selected="selected">'.$langs->trans("NotOnSell").'</option>';
print '<option value="0" selected>'.$langs->trans("NotOnSell").'</option>';
}
print '</select>';
print '</td></tr>';
@ -1108,13 +1108,13 @@ else
print '<select class="flat" name="statut_buy">';
if ($object->status_buy)
{
print '<option value="1" selected="selected">'.$langs->trans("ProductStatusOnBuy").'</option>';
print '<option value="1" selected>'.$langs->trans("ProductStatusOnBuy").'</option>';
print '<option value="0">'.$langs->trans("ProductStatusNotOnBuy").'</option>';
}
else
{
print '<option value="1">'.$langs->trans("ProductStatusOnBuy").'</option>';
print '<option value="0" selected="selected">'.$langs->trans("ProductStatusNotOnBuy").'</option>';
print '<option value="0" selected>'.$langs->trans("ProductStatusNotOnBuy").'</option>';
}
print '</select>';
print '</td></tr>';

View File

@ -126,7 +126,7 @@ class FormProduct
foreach($this->cache_warehouses as $id => $arraytypes)
{
$out.='<option value="'.$id.'"';
if ($selected == $id || ($selected == 'ifone' && $nbofwarehouses == 1)) $out.=' selected="selected"';
if ($selected == $id || ($selected == 'ifone' && $nbofwarehouses == 1)) $out.=' selected';
$out.='>';
$out.=$arraytypes['label'];
if ($fk_product) $out.=' ('.$langs->trans("Stock").': '.($arraytypes['stock']>0?$arraytypes['stock']:'?').')';
@ -184,7 +184,7 @@ class FormProduct
$return.= '<option value="'.$key.'"';
if ($key == $default)
{
$return.= ' selected="selected"';
$return.= ' selected';
}
//$return.= '>'.$value.'</option>';
$return.= '>'.measuring_units_string($key,$measuring_style).'</option>';

View File

@ -284,7 +284,7 @@ if ($object->id)
print '<option value="' . $key . '">' . $value . '</option>';
}
} else if ($delauft_lang == $key) {
print '<option value="' . $key . '" selected="selected">' . $value . '</option>';
print '<option value="' . $key . '" selected>' . $value . '</option>';
} else {
print '<option value="' . $key . '">' . $value . '</option>';
}

View File

@ -218,7 +218,7 @@ if ($action == 'create')
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="3">';
print '<select name="statut" class="flat">';
print '<option value="0">'.$langs->trans("WarehouseClosed").'</option>';
print '<option value="1" selected="selected">'.$langs->trans("WarehouseOpened").'</option>';
print '<option value="1" selected>'.$langs->trans("WarehouseOpened").'</option>';
print '</select>';
print '</td></tr>';
@ -552,8 +552,8 @@ else
print '<tr><td width="20%">'.$langs->trans("Status").'</td><td colspan="3">';
print '<select name="statut" class="flat">';
print '<option value="0" '.($object->statut == 0?'selected="selected"':'').'>'.$langs->trans("WarehouseClosed").'</option>';
print '<option value="1" '.($object->statut == 0?'':'selected="selected"').'>'.$langs->trans("WarehouseOpened").'</option>';
print '<option value="0" '.($object->statut == 0?'selected':'').'>'.$langs->trans("WarehouseClosed").'</option>';
print '<option value="1" '.($object->statut == 0?'':'selected').'>'.$langs->trans("WarehouseOpened").'</option>';
print '</select>';
print '</td></tr>';

View File

@ -111,7 +111,7 @@ class FormResource
if ($selected > 0 && $selected == $resourcestat->lines[$i]->id)
{
$out.= '<option value="'.$resourcestat->lines[$i]->id.'" selected="selected">'.$label.'</option>';
$out.= '<option value="'.$resourcestat->lines[$i]->id.'" selected>'.$label.'</option>';
}
else
{
@ -183,8 +183,8 @@ class FormResource
if ($format == 2) print '<option value="'.$arraytypes['code'].'"';
if ($format == 3) print '<option value="'.$id.'"';
// Si selected est text, on compare avec code, sinon avec id
if (preg_match('/[a-z]/i', $selected) && $selected == $arraytypes['code']) print ' selected="selected"';
elseif ($selected == $id) print ' selected="selected"';
if (preg_match('/[a-z]/i', $selected) && $selected == $arraytypes['code']) print ' selected';
elseif ($selected == $id) print ' selected';
print '>';
if ($format == 0) $value=($maxlength?dol_trunc($arraytypes['label'],$maxlength):$arraytypes['label']);
if ($format == 1) $value=$arraytypes['code'];

View File

@ -437,10 +437,10 @@ abstract class ActionsCardCommon
// TODO create a function
$this->tpl['select_customertype'] = '<select class="flat" name="client">';
$this->tpl['select_customertype'].= '<option value="2"'.($this->object->client==2?' selected="selected"':'').'>'.$langs->trans('Prospect').'</option>';
$this->tpl['select_customertype'].= '<option value="3"'.($this->object->client==3?' selected="selected"':'').'>'.$langs->trans('ProspectCustomer').'</option>';
$this->tpl['select_customertype'].= '<option value="1"'.($this->object->client==1?' selected="selected"':'').'>'.$langs->trans('Customer').'</option>';
$this->tpl['select_customertype'].= '<option value="0"'.($this->object->client==0?' selected="selected"':'').'>'.$langs->trans('NorProspectNorCustomer').'</option>';
$this->tpl['select_customertype'].= '<option value="2"'.($this->object->client==2?' selected':'').'>'.$langs->trans('Prospect').'</option>';
$this->tpl['select_customertype'].= '<option value="3"'.($this->object->client==3?' selected':'').'>'.$langs->trans('ProspectCustomer').'</option>';
$this->tpl['select_customertype'].= '<option value="1"'.($this->object->client==1?' selected':'').'>'.$langs->trans('Customer').'</option>';
$this->tpl['select_customertype'].= '<option value="0"'.($this->object->client==0?' selected':'').'>'.$langs->trans('NorProspectNorCustomer').'</option>';
$this->tpl['select_customertype'].= '</select>';
// Customer

View File

@ -961,10 +961,10 @@ else
print '<tr><td width="25%"><span class="fieldrequired"><label for="customerprospect">'.$langs->trans('ProspectCustomer').'</label></span></td>';
print '<td width="25%" class="maxwidthonsmartphone"><select class="flat" name="client" id="customerprospect">';
$selected=isset($_POST['client'])?GETPOST('client'):$object->client;
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) print '<option value="2"'.($selected==2?' selected="selected"':'').'>'.$langs->trans('Prospect').'</option>';
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print '<option value="3"'.($selected==3?' selected="selected"':'').'>'.$langs->trans('ProspectCustomer').'</option>';
if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print '<option value="1"'.($selected==1?' selected="selected"':'').'>'.$langs->trans('Customer').'</option>';
print '<option value="0"'.($selected==0?' selected="selected"':'').'>'.$langs->trans('NorProspectNorCustomer').'</option>';
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) print '<option value="2"'.($selected==2?' selected':'').'>'.$langs->trans('Prospect').'</option>';
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print '<option value="3"'.($selected==3?' selected':'').'>'.$langs->trans('ProspectCustomer').'</option>';
if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print '<option value="1"'.($selected==1?' selected':'').'>'.$langs->trans('Customer').'</option>';
print '<option value="0"'.($selected==0?' selected':'').'>'.$langs->trans('NorProspectNorCustomer').'</option>';
print '</select></td>';
print '<td width="25%"><label for="customer_code">'.$langs->trans('CustomerCode').'</label></td><td width="25%">';
@ -1435,10 +1435,10 @@ else
// Prospect/Customer
print '<tr><td width="25%"><span class="fieldrequired"><label for="customerprospect">'.$langs->trans('ProspectCustomer').'</label></span></td>';
print '<td width="25%"><select class="flat" name="client" id="customerprospect">';
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) print '<option value="2"'.($object->client==2?' selected="selected"':'').'>'.$langs->trans('Prospect').'</option>';
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print '<option value="3"'.($object->client==3?' selected="selected"':'').'>'.$langs->trans('ProspectCustomer').'</option>';
if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print '<option value="1"'.($object->client==1?' selected="selected"':'').'>'.$langs->trans('Customer').'</option>';
print '<option value="0"'.($object->client==0?' selected="selected"':'').'>'.$langs->trans('NorProspectNorCustomer').'</option>';
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) print '<option value="2"'.($object->client==2?' selected':'').'>'.$langs->trans('Prospect').'</option>';
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print '<option value="3"'.($object->client==3?' selected':'').'>'.$langs->trans('ProspectCustomer').'</option>';
if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print '<option value="1"'.($object->client==1?' selected':'').'>'.$langs->trans('Customer').'</option>';
print '<option value="0"'.($object->client==0?' selected':'').'>'.$langs->trans('NorProspectNorCustomer').'</option>';
print '</select></td>';
print '<td width="25%"><label for="customer_code">'.$langs->trans('CustomerCode').'</label></td><td width="25%">';

View File

@ -380,12 +380,12 @@ if ($resql)
// Type (customer/prospect/supplier)
print '<td class="liste_titre" align="middle">';
print '<select class="flat" name="search_type">';
print '<option value="-1"'.($search_type==''?' selected="selected"':'').'>&nbsp;</option>';
if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print '<option value="1,3"'.($search_type=='1,3'?' selected="selected"':'').'>'.$langs->trans('Customer').'</option>';
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) print '<option value="2,3"'.($search_type=='2,3'?' selected="selected"':'').'>'.$langs->trans('Prospect').'</option>';
//if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) print '<option value="3"'.($search_type=='3'?' selected="selected"':'').'>'.$langs->trans('ProspectCustomer').'</option>';
print '<option value="4"'.($search_type=='4'?' selected="selected"':'').'>'.$langs->trans('Supplier').'</option>';
print '<option value="0"'.($search_type=='0'?' selected="selected"':'').'>'.$langs->trans('Others').'</option>';
print '<option value="-1"'.($search_type==''?' selected':'').'>&nbsp;</option>';
if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print '<option value="1,3"'.($search_type=='1,3'?' selected':'').'>'.$langs->trans('Customer').'</option>';
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) print '<option value="2,3"'.($search_type=='2,3'?' selected':'').'>'.$langs->trans('Prospect').'</option>';
//if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) print '<option value="3"'.($search_type=='3'?' selected':'').'>'.$langs->trans('ProspectCustomer').'</option>';
print '<option value="4"'.($search_type=='4'?' selected':'').'>'.$langs->trans('Supplier').'</option>';
print '<option value="0"'.($search_type=='0'?' selected':'').'>'.$langs->trans('Others').'</option>';
print '</select></td>';
// Status
print '<td class="liste_titre" align="right">';