diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php
index fffc94b679f..510e9b8d3c4 100644
--- a/htdocs/admin/facture.php
+++ b/htdocs/admin/facture.php
@@ -564,7 +564,7 @@ if ($conf->banque->enabled)
$row = $db->fetch_row($resql);
print '';
$i++;
@@ -586,7 +586,7 @@ print "
".$langs->trans("SuggestPaymentByChequeToAddress")." | ";
print "";
print '';
@@ -459,7 +459,7 @@ class Form
if ($showempty)
{
print ' ';
}
@@ -475,7 +475,7 @@ class Form
{
$obj = $db->fetch_object($resql);
print 'code == $selected) print ' selected="true"';
+ if ($obj->code == $selected) print ' selected="selected"';
print '>';
if ($obj->code != $langs->trans($obj->code)) print $langs->trans($obj->code);
else print $langs->trans($obj->type);
@@ -562,7 +562,7 @@ class Form
}
if ($selected > 0 && $selected == $obj->rowid)
{
- print ''.$label.'';
+ print ''.$label.'';
}
else
{
@@ -622,7 +622,7 @@ class Form
if ($desc=='(DEPOSIT)') $desc=$langs->trans("Deposit");
$selectstring='';
- if ($selected > 0 && $selected == $obj->rowid) $selectstring=' selected="true"';
+ if ($selected > 0 && $selected == $obj->rowid) $selectstring=' selected="selected"';
$disabled='';
if ($maxvalue && $obj->amount_ttc > $maxvalue)
@@ -695,7 +695,7 @@ class Form
{
print ''.$obj->name.' '.$obj->firstname.'';
+ print ' selected="selected">'.$obj->name.' '.$obj->firstname.'';
}
else
{
@@ -773,7 +773,7 @@ class Form
if ($resql)
{
$out.= '';
- if ($show_empty) $out.= ' '."\n";
+ if ($show_empty) $out.= ' '."\n";
$num = $this->db->num_rows($resql);
$i = 0;
if ($num)
@@ -788,7 +788,7 @@ class Form
{
$out.= '';
+ $out.= ' selected="selected">';
}
else
{
@@ -937,12 +937,12 @@ class Form
}
else
{
- $outselect.='-- '.$langs->trans("MatchingProducts").' --';
+ $outselect.='-- '.$langs->trans("MatchingProducts").' --';
}
}
else
{
- $outselect.=' ';
+ $outselect.=' ';
}
$i = 0;
@@ -962,7 +962,7 @@ class Form
$outref=$objp->ref;
$opt = 'rowid == $selected)?' selected="true"':'';
+ $opt.= ($objp->rowid == $selected)?' selected="selected"':'';
if ($conf->stock->enabled && $objp->fk_product_type == 0 && isset($objp->stock))
{
if ($objp->stock > 0)
@@ -1173,12 +1173,12 @@ class Form
}
else
{
- $outselect.='-- '.$langs->trans("MatchingProducts").' --';
+ $outselect.='-- '.$langs->trans("MatchingProducts").' --';
}
}
else
{
- if (! $selected) $outselect.=' ';
+ if (! $selected) $outselect.=' ';
else $outselect.=' ';
}
@@ -1195,7 +1195,7 @@ class Form
$outref=$objp->ref;
$opt = 'idprodfournprice) $opt.= ' selected="true"';
+ if ($selected == $objp->idprodfournprice) $opt.= ' selected="selected"';
if ($objp->fprice == '') $opt.=' disabled="disabled"';
$opt.= '>';
@@ -1390,7 +1390,7 @@ class Form
if ($selected && $selected == $obj->rowid)
{
- print ''.$obj->label.'';
+ print ''.$obj->label.'';
}
else
{
@@ -1506,7 +1506,7 @@ class Form
{
if ($selected == $id)
{
- print '';
+ print '';
}
else
{
@@ -1556,8 +1556,8 @@ class Form
if ($format == 1) print '';
if ($format == 0) $value=$arraytypes['label'];
if ($format == 1) $value=$arraytypes['code'];
@@ -1599,7 +1599,7 @@ class Form
{
if ($selected == $id)
{
- $return.= ''.$value;
+ $return.= ''.$value;
}
else
{
@@ -1637,7 +1637,7 @@ class Form
$obj = $this->db->fetch_object($resql);
if ($selected == $obj->id)
{
- print '';
+ print '';
}
else
{
@@ -1697,7 +1697,7 @@ class Form
$obj = $this->db->fetch_object($result);
if ($selected == $obj->rowid)
{
- print '';
+ print '';
}
else
{
@@ -1748,7 +1748,7 @@ class Form
{
if ($cate_arbo[$key]['id'] == $selected)
{
- $add = 'selected="true" ';
+ $add = 'selected="selected" ';
}
else
{
@@ -2299,7 +2299,7 @@ class Form
if ($selected && $selected == $obj->code_iso)
{
$foundselected=true;
- $out.= '';
+ $out.= '';
}
else
{
@@ -2485,7 +2485,7 @@ class Form
$return.= '"';
if ($txtva[$i] == $defaulttx && $nprtva[$i] == $defaultnpr)
{
- $return.= ' selected="true"';
+ $return.= ' selected="selected"';
}
$return.= '>'.vatrate($libtva[$i]);
$return.= $nprtva[$i] ? ' *': '';
@@ -2642,14 +2642,14 @@ class Form
if ($empty || $set_time == -1)
{
- $retstring.=' ';
+ $retstring.=' ';
}
for ($day = 1 ; $day <= 31; $day++)
{
if ($day == $sday)
{
- $retstring.="$day";
+ $retstring.="$day";
}
else
{
@@ -2663,13 +2663,13 @@ class Form
$retstring.='';
if ($empty || $set_time == -1)
{
- $retstring.=' ';
+ $retstring.=' ';
}
// Month
for ($month = 1 ; $month <= 12 ; $month++)
{
- $retstring.='';
+ $retstring.='';
$retstring.=dol_print_date(mktime(12,0,0,$month,1,2000),"%b");
$retstring.="";
}
@@ -2832,7 +2832,7 @@ class Form
for ($min = 0; $min <= 55; $min=$min+5)
{
print ''.$min.'';
}
print "";
@@ -2862,7 +2862,7 @@ class Form
if ($show_empty)
{
- $out.=' '."\n";
+ $out.=' '."\n";
}
if (is_array($array))
@@ -2873,7 +2873,7 @@ class Form
// Si il faut pre-selectionner une valeur
if ($id != '' && ($id == $key || $id == $value))
{
- $out.=' selected="true"';
+ $out.=' selected="selected"';
}
$out.='>';
@@ -2931,13 +2931,13 @@ class Form
$resultyesno = ''."\n";
if (("$value" == 'yes') || ($value == 1))
{
- $resultyesno .= ''.$langs->trans("Yes").''."\n";
+ $resultyesno .= ''.$langs->trans("Yes").''."\n";
$resultyesno .= ''.$langs->trans("No").''."\n";
}
else
{
$resultyesno .= ''.$langs->trans("Yes").''."\n";
- $resultyesno .= ''.$langs->trans("No").''."\n";
+ $resultyesno .= ''.$langs->trans("No").''."\n";
}
$resultyesno .= ''."\n";
return $resultyesno;
@@ -2975,7 +2975,7 @@ class Form
$obj = $this->db->fetch_object($result);
if ($selected == $obj->rowid)
{
- print '';
+ print '';
}
else
{
@@ -3020,7 +3020,7 @@ class Form
{
if ($selected == $key)
{
- $select_week .= '';
+ $select_week .= '';
}
else
{
@@ -3052,7 +3052,7 @@ class Form
{
if ($selected == $key)
{
- $select_month .= '';
+ $select_month .= '';
}
else
{
@@ -3084,7 +3084,7 @@ class Form
if($useempty)
{
if($selected == '')
- $selected_html = 'selected="true"';
+ $selected_html = 'selected="selected"';
print ' ';
}
for ($y = $max_year; $y >= $min_year; $y--)
@@ -3092,7 +3092,7 @@ class Form
$selected_html='';
if ($y == $selected)
{
- $selected_html = 'selected="true"';
+ $selected_html = 'selected="selected"';
}
print "$y";
print "";
diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php
index 24a4db8657a..e90bdbdb36c 100644
--- a/htdocs/core/class/html.formactions.class.php
+++ b/htdocs/core/class/html.formactions.class.php
@@ -72,7 +72,7 @@ class FormActions
print '';
foreach($listofstatus as $key => $val)
{
- print ''.$val.'';
+ print ''.$val.'';
}
print '';
if ($selected == 0 || $selected == 100) $canedit=0;
diff --git a/htdocs/core/class/html.formadmin.class.php b/htdocs/core/class/html.formadmin.class.php
index add66c06491..ce22e062e88 100644
--- a/htdocs/core/class/html.formadmin.class.php
+++ b/htdocs/core/class/html.formadmin.class.php
@@ -80,13 +80,13 @@ class FormAdmin
if ($showempty)
{
$out.= ' ';
}
if ($showauto)
{
$out.= ''.$langs->trans("AutoDetectLang").'';
}
@@ -108,7 +108,7 @@ class FormAdmin
}
else if ($selected == $key)
{
- $out.= ''.$value.'';
+ $out.= ''.$value.'';
}
else
{
@@ -146,7 +146,7 @@ class FormAdmin
if ($file == $selected)
{
- $menuarray[$prefix.'_'.$file]=''.$filelib.'';
+ $menuarray[$prefix.'_'.$file]=''.$filelib.'';
}
else
{
@@ -189,7 +189,7 @@ class FormAdmin
global $langs,$conf;
$menuarray=array();
-
+
foreach($dirmenuarray as $dirmenu)
{
$handle=opendir($dirmenu);
@@ -201,14 +201,14 @@ class FormAdmin
if (preg_match('/^default/i',$filelib)) continue;
if (preg_match('/^empty/i',$filelib)) continue;
if (preg_match('/\.lib/i',$filelib)) continue;
-
+
$menuarray[$filelib]=1;
}
$menuarray['all']=1;
}
closedir($handle);
}
-
+
ksort($menuarray);
// Affichage liste deroulante des menus
@@ -221,7 +221,7 @@ class FormAdmin
print '';
@@ -276,7 +276,7 @@ class FormAdmin
foreach ($arraytz as $lib => $gmt)
{
print ''.$gmt.''."\n";
}
print '';
@@ -302,7 +302,7 @@ class FormAdmin
foreach ($arrayofcolors as $val)
{
print ''.$val.'';
}
print '';
diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php
index 6f83620fcf2..9243faf4797 100644
--- a/htdocs/core/class/html.formcompany.class.php
+++ b/htdocs/core/class/html.formcompany.class.php
@@ -157,7 +157,7 @@ class FormCompany
$obj = $this->db->fetch_object($resql);
print 'code) print ' selected="true"';
+ if ($selected == $obj->code) print ' selected="selected"';
print '>';
$level=$langs->trans($obj->code);
if ($level == $obj->code) $level=$langs->trans($obj->label);
@@ -251,7 +251,7 @@ class FormCompany
if ($selected > 0 && $selected == $obj->rowid)
{
- $out.= '';
+ $out.= '';
}
else
{
@@ -320,7 +320,7 @@ class FormCompany
if ($selected > 0 && $selected == $obj->code)
{
- print ''.$obj->libelle.'';
+ print ''.$obj->libelle.'';
}
else
{
@@ -378,7 +378,7 @@ class FormCompany
$obj = $this->db->fetch_object($resql);
if ($selected == $obj->code)
{
- $out.= '';
+ $out.= '';
}
else
{
@@ -462,7 +462,7 @@ class FormCompany
if ($selected > 0 && $selected == $obj->code)
{
- $out.= '';
+ $out.= '';
}
else
{
@@ -573,7 +573,7 @@ class FormCompany
{
print ''.dol_trunc($obj->nom,24).'';
+ print ' selected="selected">'.dol_trunc($obj->nom,24).'';
$firstCompany = $obj->rowid;
}
else
diff --git a/htdocs/core/class/html.formorder.class.php b/htdocs/core/class/html.formorder.class.php
index 9a6d2db0e61..725a5aa815a 100644
--- a/htdocs/core/class/html.formorder.class.php
+++ b/htdocs/core/class/html.formorder.class.php
@@ -58,16 +58,16 @@ class FormOrder
{
global $conf,$langs;
print '';
- if ($addempty) print ' ';
+ if ($addempty) print ' ';
// \TODO Aller chercher les sources dans dictionnaire
- print ''.$langs->trans('OrderSource0').'';
- print ''.$langs->trans('OrderSource1').'';
- print ''.$langs->trans('OrderSource2').'';
- print ''.$langs->trans('OrderSource3').'';
- print ''.$langs->trans('OrderSource4').'';
- print ''.$langs->trans('OrderSource5').'';
- print ''.$langs->trans('OrderSource6').'';
+ print ''.$langs->trans('OrderSource0').'';
+ print ''.$langs->trans('OrderSource1').'';
+ print ''.$langs->trans('OrderSource2').'';
+ print ''.$langs->trans('OrderSource3').'';
+ print ''.$langs->trans('OrderSource4').'';
+ print ''.$langs->trans('OrderSource5').'';
+ print ''.$langs->trans('OrderSource6').'';
print '';
}
diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php
index bbb0b8bf4e2..129b4502f40 100644
--- a/htdocs/core/class/html.formother.class.php
+++ b/htdocs/core/class/html.formother.class.php
@@ -84,7 +84,7 @@ class FormOther
$obj = $this->db->fetch_object($result);
if ($selected == $obj->rowid)
{
- print '';
+ print '';
}
else
{
@@ -131,7 +131,7 @@ class FormOther
$obj = $this->db->fetch_object($result);
if ($selected == $obj->rowid)
{
- print '';
+ print '';
}
else
{
@@ -178,7 +178,7 @@ class FormOther
$obj = $this->db->fetch_object($resql);
if ($selected && $selected == $obj->rowid)
{
- print '';
+ print '';
}
else
{
@@ -218,7 +218,7 @@ class FormOther
{
if ($selected == $i)
{
- $return.= '';
+ $return.= '';
}
else
{
@@ -258,7 +258,7 @@ class FormOther
foreach ($tab_categs as $categ)
{
$moreforfilter.=''.dol_trunc($categ['fulllabel'],50,'middle').'';
}
}
@@ -307,7 +307,7 @@ class FormOther
{
$moreforfilter.='rowid == $selected) $moreforfilter.=' selected="true"';
+ if ($obj_usr->rowid == $selected) $moreforfilter.=' selected="selected"';
$moreforfilter.='>';
$moreforfilter.=$obj_usr->firstname." ".$obj_usr->name." (".$obj_usr->login.')';
@@ -416,7 +416,7 @@ class FormOther
foreach ($arrayofcolors as $val)
{
print ''.$val.'';
}
print '';
@@ -501,7 +501,7 @@ function PLineSelect(&$inc, $parent, $lines, $level=0, $selectedtask=0, $selecte
{
if ($i > 0 && $conf->browser->firefox) print '----------';
print 'fk_project) print ' selected="true"';
+ if ($selectedproject == $lines[$i]->fk_project) print ' selected="selected"';
print '>'; // Project -> Task
print $langs->trans("Project").' '.$lines[$i]->projectref;
if (empty($lines[$i]->public))
@@ -524,7 +524,7 @@ function PLineSelect(&$inc, $parent, $lines, $level=0, $selectedtask=0, $selecte
if ($lines[$i]->id > 0)
{
print 'id == $selectedtask) print ' selected="true"';
+ if ($lines[$i]->id == $selectedtask) print ' selected="selected"';
print '>';
print $langs->trans("Project").' '.$lines[$i]->projectref;
if (empty($lines[$i]->public))
diff --git a/htdocs/ecm/class/htmlecm.form.class.php b/htdocs/ecm/class/htmlecm.form.class.php
index 5edd58df7c5..736d204e231 100644
--- a/htdocs/ecm/class/htmlecm.form.class.php
+++ b/htdocs/ecm/class/htmlecm.form.class.php
@@ -73,7 +73,7 @@ class FormEcm
{
if ($cate_arbo[$key]['id'] == $selected)
{
- $add = 'selected="true" ';
+ $add = 'selected="selected" ';
}
else
{
diff --git a/htdocs/includes/barcode/html.formbarcode.class.php b/htdocs/includes/barcode/html.formbarcode.class.php
index 5ff233d6b41..253664281d9 100644
--- a/htdocs/includes/barcode/html.formbarcode.class.php
+++ b/htdocs/includes/barcode/html.formbarcode.class.php
@@ -88,11 +88,11 @@ class FormBarCode
$select_encoder.= '';
$select_encoder.= '';
$select_encoder.= '';
- $select_encoder.= ''.$langs->trans('Disable').'';
+ $select_encoder.= ''.$langs->trans('Disable').'';
$select_encoder.= '--------------------';
foreach($barcodelist as $key => $value)
{
- $select_encoder.= ''.$value.'';
+ $select_encoder.= ''.$value.'';
}
$select_encoder.= '';
@@ -129,7 +129,7 @@ class FormBarCode
else
{
print '';
- print ''.$langs->trans('NoActivatedBarcode').'';
+ print ''.$langs->trans('NoActivatedBarcode').'';
}
while ($i < $num)
@@ -137,7 +137,7 @@ class FormBarCode
$obj = $this->db->fetch_object($result);
if ($selected == $obj->rowid)
{
- print '';
+ print '';
}
else
{
diff --git a/htdocs/lib/project.lib.php b/htdocs/lib/project.lib.php
index 109ef62671f..0eb44429f9b 100644
--- a/htdocs/lib/project.lib.php
+++ b/htdocs/lib/project.lib.php
@@ -220,7 +220,7 @@ function select_projects($socid=-1, $selected='', $htmlname='projectid')
//else $labeltoshow.=' ('.$langs->trans("Private").')';
if (!empty($selected) && $selected == $obj->rowid && $obj->fk_statut > 0)
{
- print ''.$labeltoshow.'';
+ print ''.$labeltoshow.'';
}
else
{
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index af14f4ee6f1..f8b2b4524b1 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -1142,12 +1142,8 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
print "\n\n\n";
- print "\n";
-
- if (! $conf->use_javascript_ajax || ! $conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)
- {
- print ' |