Skip to content

Commit

Permalink
[Qual] Fixed HTML readonly attribute
Browse files Browse the repository at this point in the history
Dolibarr uses HTML 4.01 or HTML5 doctypes.
The readonly attribute is boolean.
  • Loading branch information
rdoursenaud committed May 12, 2015
1 parent a94121a commit ce60ae0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion htdocs/core/class/extrafields.class.php
Expand Up @@ -1124,7 +1124,7 @@ function showOutputField($key,$value,$moreparam='')
if (!empty($value)) {
$checked=' checked ';
}
$value='<input type="checkbox" '.$checked.' '.($moreparam?$moreparam:'').' readonly="readonly" disabled>';
$value='<input type="checkbox" '.$checked.' '.($moreparam?$moreparam:'').' readonly disabled>';
}
elseif ($type == 'mail')
{
Expand Down
12 changes: 6 additions & 6 deletions htdocs/core/tpl/objectline_edit.tpl.php
Expand Up @@ -99,7 +99,7 @@
$doleditor=new DolEditor('product_desc',$line->description,'',164,$toolbarname,'',false,true,$enable,$nbrows,'98%');
$doleditor->Create();
} else {
print '<textarea id="desc" class="flat" name="desc" readonly="readonly" style="width: 200px; height:80px;">' . $line->description . '</textarea>';
print '<textarea id="desc" class="flat" name="desc" readonly style="width: 200px; height:80px;">' . $line->description . '</textarea>';
}
?>
</td>
Expand All @@ -113,19 +113,19 @@
if ($this->situation_counter == 1 || !$this->situation_cycle_ref) {
print '<td align="right">' . $form->load_tva('tva_tx',$line->tva_tx,$seller,$buyer,0,$line->info_bits,$line->product_type) . '</td>';
} else {
print '<td align="right"><input size="1" type="text" class="flat" name="tva_tx" value="' . price($line->tva_tx) . '" readonly="readonly" />%</td>';
print '<td align="right"><input size="1" type="text" class="flat" name="tva_tx" value="' . price($line->tva_tx) . '" readonly />%</td>';
}

$coldisplay++;
print '<td align="right"><input type="text" class="flat" size="8" id="price_ht" name="price_ht" value="' . (isset($line->pu_ht)?price($line->pu_ht,0,'',0):price($line->subprice,0,'',0)) . '"';
if ($this->situation_counter > 1) print ' readonly="readonly"';
if ($this->situation_counter > 1) print ' readonly';
print '></td>';

if ($inputalsopricewithtax)
{
$coldisplay++;
print '<td align="right"><input type="text" class="flat" size="8" id="price_ttc" name="price_ttc" value="'.(isset($line->pu_ttc)?price($line->pu_ttc,0,'',0):'').'"';
if ($this->situation_counter > 1) print ' readonly="readonly"';
if ($this->situation_counter > 1) print ' readonly';
print '></td>';
}
?>
Expand All @@ -136,7 +136,7 @@
// 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 '<input size="3" type="text" class="flat" name="qty" id="qty" value="' . $line->qty . '"';
if ($this->situation_counter > 1) print ' readonly="readonly"';
if ($this->situation_counter > 1) print ' readonly';
print '>';
} else { ?>
&nbsp;
Expand All @@ -155,7 +155,7 @@
<td align="right" nowrap><?php $coldisplay++; ?>
<?php if (($line->info_bits & 2) != 2) {
print '<input size="1" type="text" class="flat" name="remise_percent" id="remise_percent" value="' . $line->remise_percent . '"';
if ($this->situation_counter > 1) print ' readonly="readonly"';
if ($this->situation_counter > 1) print ' readonly';
print '>%';
} else { ?>
&nbsp;
Expand Down

0 comments on commit ce60ae0

Please sign in to comment.