diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index 0a005862054cd0430bfbca17e93568e64d0a1ce6..c1ad179342a3ab3e330c00aaf1f05ec4d3c7a069 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -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(); \ No newline at end of file +$db->close(); diff --git a/htdocs/accountancy/class/html.formventilation.class.php b/htdocs/accountancy/class/html.formventilation.class.php index f2b6ba6346cdafa48fb93f961cb904f05f5f8c74..abd66a7885dc230ce2985840e0ef09378f099c5b 100644 --- a/htdocs/accountancy/class/html.formventilation.class.php +++ b/htdocs/accountancy/class/html.formventilation.class.php @@ -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>'; } diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index 2dca4821727fa467af49fdc6380d5a8676c3033d..e993d2c276ccc8c44703c9087b1c334f32360b90 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -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++; diff --git a/htdocs/admin/menus/edit.php b/htdocs/admin/menus/edit.php index e69719603c34d1f808eae0294eeda53a33e0c75d..9ded9ae1f34a1ff348373f581e55757a6627a9b6 100644 --- a/htdocs/admin/menus/edit.php +++ b/htdocs/admin/menus/edit.php @@ -323,8 +323,8 @@ if ($action == 'create') { print '<select name="type" class="flat" id="topleft">'; print '<option value=""> </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 diff --git a/htdocs/admin/tools/dolibarr_export.php b/htdocs/admin/tools/dolibarr_export.php index 7cd98625ac908d7202ca7f2bb1371b0be3258b49..842efb3a0ac4e1bd1bcc0a35885f708285aa12c3 100644 --- a/htdocs/admin/tools/dolibarr_export.php +++ b/htdocs/admin/tools/dolibarr_export.php @@ -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" diff --git a/htdocs/cashdesk/tpl/facturation1.tpl.php b/htdocs/cashdesk/tpl/facturation1.tpl.php index 98300b71e80d939628a4b227dce1d8697e893e3b..b004314f66c74cb48b75962ac352362487abb420 100644 --- a/htdocs/cashdesk/tpl/facturation1.tpl.php +++ b/htdocs/cashdesk/tpl/facturation1.tpl.php @@ -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 = ''; diff --git a/htdocs/comm/prospect/list.php b/htdocs/comm/prospect/list.php index 12f327ba0d56df9027c6d795379b645fffd318f4..47c051a4f47e6b0616715a6004b0f26a1c58c665 100644 --- a/htdocs/comm/prospect/list.php +++ b/htdocs/comm/prospect/list.php @@ -368,7 +368,7 @@ if ($resql) $options_from = '<option value=""> </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=""> </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>'; } diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index d80b48d85aa3dcb3ae825abe78ddbc290879d561..536bdc9166285a0bdadec1bf9f774bdb03701efa 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -202,7 +202,7 @@ if ($id > 0 || ! empty($ref)) $var=True; $num = $db->num_rows($result); $i = 0; - $options = '<option value="0" selected="true"> </option>'; + $options = '<option value="0" selected> </option>'; while ($i < $num) { $obj = $db->fetch_object($result); diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php index 4a4b4f6553bb42a40e7457e43921bcb64449d6d5..6e8b896f5aa1731697b7586f8439169b358aa491 100644 --- a/htdocs/compta/bank/ligne.php +++ b/htdocs/compta/bank/ligne.php @@ -215,7 +215,7 @@ if ($result) $var=True; $num = $db->num_rows($result); $i = 0; - $options = "<option value=\"0\" selected=\"true\"> </option>"; + $options = "<option value=\"0\" selected> </option>"; while ($i < $num) { $obj = $db->fetch_object($result); diff --git a/htdocs/compta/bank/rappro.php b/htdocs/compta/bank/rappro.php index 22d49afe0552a4506dd54772264deec7dd8933a7..d62e0658dd0bdd957f9aca231b54c82d13c1f171 100644 --- a/htdocs/compta/bank/rappro.php +++ b/htdocs/compta/bank/rappro.php @@ -115,12 +115,12 @@ if ($resql) { $var=True; $num = $db->num_rows($resql); - if ($num > 0) $options .= '<option value="0"'.(GETPOST('cat')?'':' selected="true"').'> </option>'; + if ($num > 0) $options .= '<option value="0"'.(GETPOST('cat')?'':' selected').'> </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); diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 1cb683123cc6cc385b8840ab02204a06b50caf58..1aaca07b57d9a6e5c07a1be0a19f0b9ae48ffd8c 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -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") . ' '; diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 765274c6a8d6ab15e412d7291349f8b735ca8ee7..e25107e24fa3ff0805641d1ca2334805bdb8048e 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -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>'; } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 3a25023592b7d093c8ab6aad5e9a2512439b67f2..1e05a3b6c3dc8692882194b13742e1c1259313c9 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -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 '> </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 '> </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"':'').'> </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':'').'> </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"> </option>'; + $out.='<option value="0" selected> </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"> </option>'; + if (! $selected) $out.='<option value="0" selected> </option>'; else $out.='<option value="0"> </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"':'').'> </option>'; + if ($addempty) print '<option value="0"'.(empty($selected)?' selected':'').'> </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"> </option>'; + $retstring.='<option value="0" selected> </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"> </option>'; + $retstring.='<option value="0" selected> </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=' '; // If we use ajaxcombo, we need 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"':'').'> </option>'."\n"; + if ($show_empty) $out.= '<option value="-1"'.($selected==-1?' selected':'').'> </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>'; diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index 8dda6772510e843cf98b9d625194d6af5e746cc9..c656cb0432d75b657c8b3c6b44512ce5ef0b9bfe 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -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>'; diff --git a/htdocs/core/class/html.formadmin.class.php b/htdocs/core/class/html.formadmin.class.php index 06c03a82d6892d6567e0945fb6e53a6fed91ed9e..e5d8fa5688e862cdeb6228ed58be5f6213f983b4 100644 --- a/htdocs/core/class/html.formadmin.class.php +++ b/htdocs/core/class/html.formadmin.class.php @@ -68,13 +68,13 @@ class FormAdmin if ($showempty) { $out.= '<option value=""'; - if ($selected == '') $out.= ' selected="selected"'; + if ($selected == '') $out.= ' selected'; $out.= '> </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.= '> </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 { diff --git a/htdocs/core/class/html.formaskpricesupplier.class.php b/htdocs/core/class/html.formaskpricesupplier.class.php index ba7a6d8fee457244ed6567a62616d10542176bd9..770c88ac844665d920ce3c45216ec6d1b695d8c4 100644 --- a/htdocs/core/class/html.formaskpricesupplier.class.php +++ b/htdocs/core/class/html.formaskpricesupplier.class.php @@ -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 { diff --git a/htdocs/core/class/html.formbank.class.php b/htdocs/core/class/html.formbank.class.php index 6335e25dd726d6bfe611b75204e6bdb24e1f2651..7de7b721f9aec779a0fe07ccefb8ee0880908e18 100644 --- a/htdocs/core/class/html.formbank.class.php +++ b/htdocs/core/class/html.formbank.class.php @@ -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 { diff --git a/htdocs/core/class/html.formbarcode.class.php b/htdocs/core/class/html.formbarcode.class.php index 3db273b84967a2857c38175474b9081ea4167ef7..2e93eaf9f5d21692ccf0406601e452fa6f20e3b5 100644 --- a/htdocs/core/class/html.formbarcode.class.php +++ b/htdocs/core/class/html.formbarcode.class.php @@ -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 { diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index e5e58d5316da7e13c3049f44ad85495ca109d6b2..4f600ac0705c00ff6fcc1b6be10913d8685e9731 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -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 { diff --git a/htdocs/core/class/html.formcontract.class.php b/htdocs/core/class/html.formcontract.class.php index 01c6a5bc6403079c2c1ffe1eef2bcb8c37539e2b..0169f5ae8111a011fae5be79e81fc2248eb03ada 100644 --- a/htdocs/core/class/html.formcontract.class.php +++ b/htdocs/core/class/html.formcontract.class.php @@ -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 { diff --git a/htdocs/core/class/html.formcron.class.php b/htdocs/core/class/html.formcron.class.php index 86c804138556b4200e18eaf5690fa22c47c40cc5..255868f02a50f5acbcfd3c4b6b8b4f05b5907f67 100644 --- a/htdocs/core/class/html.formcron.class.php +++ b/htdocs/core/class/html.formcron.class.php @@ -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=''; } diff --git a/htdocs/core/class/html.formintervention.class.php b/htdocs/core/class/html.formintervention.class.php index 43bc3c96eb02870be69de33164d62f66767f18c2..b675ba6e67451ccba765102f19d95c036c84785a 100644 --- a/htdocs/core/class/html.formintervention.class.php +++ b/htdocs/core/class/html.formintervention.class.php @@ -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 { diff --git a/htdocs/core/class/html.formmailing.class.php b/htdocs/core/class/html.formmailing.class.php index 93fdac553a3a0e43228e563ee5af8c44c81d1014..3c47aceee8a4f6dacd70943b0834a2427812cf41 100644 --- a/htdocs/core/class/html.formmailing.class.php +++ b/htdocs/core/class/html.formmailing.class.php @@ -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; } -} \ No newline at end of file +} diff --git a/htdocs/core/class/html.formorder.class.php b/htdocs/core/class/html.formorder.class.php index 2abc0c3848504220be5bae21168b8102902333db..ea5ca1c00482af7c7deed9f1bf0c476a1c889b35 100644 --- a/htdocs/core/class/html.formorder.class.php +++ b/htdocs/core/class/html.formorder.class.php @@ -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"> </option>'; + if ($addempty) print '<option value="-1" selected> </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>'; } diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index 3e36e374da6cd4d2d139e768ed8c550319ae9938..b14ff62648080a03d08a564ceeaa46a58fe2b261 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -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 . '> </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 { diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php index 0cc8f94ff5a14b49c5cf9869ab8aad1988e7302c..9469b680631c45a326071ce920e87ba64778b241 100644 --- a/htdocs/core/class/html.formprojet.class.php +++ b/htdocs/core/class/html.formprojet.class.php @@ -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 { diff --git a/htdocs/core/class/html.formpropal.class.php b/htdocs/core/class/html.formpropal.class.php index df0f2d644dde75d76ff6c328af49bfc4eb253970..987d5d766826b67b9bf3822783466b0dc3c4c4ec 100644 --- a/htdocs/core/class/html.formpropal.class.php +++ b/htdocs/core/class/html.formpropal.class.php @@ -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 { diff --git a/htdocs/core/class/html.formsms.class.php b/htdocs/core/class/html.formsms.class.php index 51841a27e24cfdcce59eec235318415501d372e0..815bad896b5f4a6fd2d8246a88795d31905d890c 100644 --- a/htdocs/core/class/html.formsms.class.php +++ b/htdocs/core/class/html.formsms.class.php @@ -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>'; diff --git a/htdocs/core/class/html.formsocialcontrib.class.php b/htdocs/core/class/html.formsocialcontrib.class.php index abf453cf426386f2c9ccedd6335e9cf97f0e52ed..e6b31aa4a51fac901c2e33d14ccf224a04aa58d5 100644 --- a/htdocs/core/class/html.formsocialcontrib.class.php +++ b/htdocs/core/class/html.formsocialcontrib.class.php @@ -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++; } diff --git a/htdocs/cron/card.php b/htdocs/cron/card.php index 3ddadfd123e322560feec363a4a55114b53de0b9..8d87380b12ced3fd3c1d350de0a360c95b37ebc7 100644 --- a/htdocs/cron/card.php +++ b/htdocs/cron/card.php @@ -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 { diff --git a/htdocs/ecm/class/htmlecm.form.class.php b/htdocs/ecm/class/htmlecm.form.class.php index 3675e2a24c7c512ee039cd91daf31350cb29c6c2..a3ffc8a37ad410d43434161d70276a4c3cd461b8 100644 --- a/htdocs/ecm/class/htmlecm.form.class.php +++ b/htdocs/ecm/class/htmlecm.form.class.php @@ -72,7 +72,7 @@ class FormEcm { if ($cate_arbo[$key]['id'] == $selected) { - $add = 'selected="selected" '; + $add = 'selected '; } else { diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index b66ff15494b2657c415a979199306dcfa12c7170..476a8862041eebdd6ca6dfc5485a6a11b86b4e01 100755 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -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>'; diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index d3842411d9469fabad0d69b6c2af5b62c91125cb..63924d9c952546b3bc1e504370108587930e1aa9 100755 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -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 '> </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>'; -} \ No newline at end of file +} diff --git a/htdocs/expensereport/export_csv.php b/htdocs/expensereport/export_csv.php index ba3621d1ac05bad4ce4b413046f38295b2af75e0..3a2010ce340796ca7c5ffade5cdf74516dde1844 100755 --- a/htdocs/expensereport/export_csv.php +++ b/htdocs/expensereport/export_csv.php @@ -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>'; } diff --git a/htdocs/exports/class/export.class.php b/htdocs/exports/class/export.class.php index c044dfc4704fa4c161fb374927dbfc0452eccb20..72037500606ac40c32d74b6113553cacdd20bc3a 100644 --- a/htdocs/exports/class/export.class.php +++ b/htdocs/exports/class/export.class.php @@ -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 { diff --git a/htdocs/holiday/admin/tomergewithholiday.php b/htdocs/holiday/admin/tomergewithholiday.php index c301e1ba3489687e98184723898138ab714501cf..e4630f35bce73c04b333ec785c42a895656cadd9 100644 --- a/htdocs/holiday/admin/tomergewithholiday.php +++ b/htdocs/holiday/admin/tomergewithholiday.php @@ -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> diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 5a087801a782bbd211a80771cb6682858a5827b8..90492fa16f11124ee55e802780136d84eb2ee3ca 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -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"; } diff --git a/htdocs/install/fileconf.php b/htdocs/install/fileconf.php index d3d2e5dbadf3bba213abd7d9b001d40cea26a3dc..1256c5b215a50fdaa67a50116b1469ae184e2302 100644 --- a/htdocs/install/fileconf.php +++ b/htdocs/install/fileconf.php @@ -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.='>'; diff --git a/htdocs/product/card.php b/htdocs/product/card.php index f8b945c25590e7b074ba30233e62f9994b471620..f6e64b36f6aea32d3cc2a48851d7bc8716b6a5a7 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -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>'; diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index 4380ab97f565d064bd8c9f42662885d167014eea..6fc649c272ee16587159673d5bb43040622c84e1 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.php @@ -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>'; diff --git a/htdocs/product/document.php b/htdocs/product/document.php index 46fed167c96f287a96e40c2ebb716b480fdba3ea..797af35248ec328bef288b3387518c36ac3ee5f3 100644 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -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>'; } diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index 37f39010659cc449485b0320f3e05a53faa5cb9f..538a46cea90a68ba967372137e0a7a1f11e29a0c 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -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>'; diff --git a/htdocs/resource/class/html.formresource.class.php b/htdocs/resource/class/html.formresource.class.php index ca01963e30bb3a3a9b53ed279b06475d934a9153..4128de6feadff9c0cac0bd104bba4d9085b6d1fa 100644 --- a/htdocs/resource/class/html.formresource.class.php +++ b/htdocs/resource/class/html.formresource.class.php @@ -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']; diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php index c5389c734520e4ba8277aa96af710c5bb3b93a2f..f1472dcb2d7e48005c352447ec387f852f5e45b3 100644 --- a/htdocs/societe/canvas/actions_card_common.class.php +++ b/htdocs/societe/canvas/actions_card_common.class.php @@ -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 diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 32f5f71e7c3153cde1230c92f24f34fa526b9b96..00345c87566a50289ca9828bf1a556c6e7bd9ceb 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -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%">'; diff --git a/htdocs/societe/societe.php b/htdocs/societe/societe.php index e44954be5450b0fac6a7c7a41398100479c04791..b3484a7c008fbdfef3a8f98c8c70a31e916683e3 100644 --- a/htdocs/societe/societe.php +++ b/htdocs/societe/societe.php @@ -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"':'').'> </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':'').'> </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">';