From ce60ae0fcc9e5a62b1a98ed88e72485a3d804403 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Tue, 12 May 2015 15:09:23 +0200 Subject: [PATCH] [Qual] Fixed HTML readonly attribute Dolibarr uses HTML 4.01 or HTML5 doctypes. The readonly attribute is boolean. --- htdocs/core/class/extrafields.class.php | 2 +- htdocs/core/tpl/objectline_edit.tpl.php | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index e25107e24fa..1c132502b78 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1124,7 +1124,7 @@ class ExtraFields if (!empty($value)) { $checked=' checked '; } - $value=''; + $value=''; } elseif ($type == 'mail') { diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index bc23438dfbc..222b6eb0ea2 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -99,7 +99,7 @@ $coldisplay=-1; // We remove first td $doleditor=new DolEditor('product_desc',$line->description,'',164,$toolbarname,'',false,true,$enable,$nbrows,'98%'); $doleditor->Create(); } else { - print ''; + print ''; } ?> @@ -113,19 +113,19 @@ $coldisplay=-1; // We remove first td if ($this->situation_counter == 1 || !$this->situation_cycle_ref) { print '' . $form->load_tva('tva_tx',$line->tva_tx,$seller,$buyer,0,$line->info_bits,$line->product_type) . ''; } else { - print '%'; + print '%'; } $coldisplay++; print 'situation_counter > 1) print ' readonly="readonly"'; + if ($this->situation_counter > 1) print ' readonly'; print '>'; if ($inputalsopricewithtax) { $coldisplay++; print 'situation_counter > 1) print ' readonly="readonly"'; + if ($this->situation_counter > 1) print ' readonly'; print '>'; } ?> @@ -136,7 +136,7 @@ $coldisplay=-1; // We remove first td // must also not be output for most entities (proposal, intervention, ...) //if($line->qty > $line->stock) print img_picto($langs->trans("StockTooLow"),"warning", 'style="vertical-align: bottom;"')." "; print 'situation_counter > 1) print ' readonly="readonly"'; + if ($this->situation_counter > 1) print ' readonly'; print '>'; } else { ?>   @@ -155,7 +155,7 @@ $coldisplay=-1; // We remove first td info_bits & 2) != 2) { print 'situation_counter > 1) print ' readonly="readonly"'; + if ($this->situation_counter > 1) print ' readonly'; print '>%'; } else { ?>