Remove useles html generated code. More code comment.
This commit is contained in:
parent
c05e623d97
commit
1f4742b77b
@ -76,7 +76,7 @@ class Form
|
|||||||
* @param string $htmlname Name of select field ('edit' prefix will be added)
|
* @param string $htmlname Name of select field ('edit' prefix will be added)
|
||||||
* @param string $preselected Name of Value to show/edit (not used in this function)
|
* @param string $preselected Name of Value to show/edit (not used in this function)
|
||||||
* @param object $object Object
|
* @param object $object Object
|
||||||
* @param boolean $perm Permission to allow button to edit parameter
|
* @param boolean $perm Permission to allow button to edit parameter. Set it to 0 to have a not edited field.
|
||||||
* @param string $typeofdata Type of data ('string' by default, 'email', 'numeric:99', 'text' or 'textarea:rows:cols', 'day' or 'datepicker', 'ckeditor:dolibarr_zzz:width:height:savemethod:1:rows:cols', 'select;xxx[:class]'...)
|
* @param string $typeofdata Type of data ('string' by default, 'email', 'numeric:99', 'text' or 'textarea:rows:cols', 'day' or 'datepicker', 'ckeditor:dolibarr_zzz:width:height:savemethod:1:rows:cols', 'select;xxx[:class]'...)
|
||||||
* @param string $moreparam More param to add on a href URL
|
* @param string $moreparam More param to add on a href URL
|
||||||
* @return string HTML edit field
|
* @return string HTML edit field
|
||||||
@ -104,11 +104,11 @@ class Form
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$ret.='<table class="nobordernopadding" width="100%"><tr><td class="nowrap">';
|
if (GETPOST('action') != 'edit'.$htmlname && $perm) $ret.='<table class="nobordernopadding" width="100%"><tr><td class="nowrap">';
|
||||||
$ret.=$langs->trans($text);
|
$ret.=$langs->trans($text);
|
||||||
$ret.='</td>';
|
if (GETPOST('action') != 'edit'.$htmlname && $perm) $ret.='</td>';
|
||||||
if (GETPOST('action') != 'edit'.$htmlname && $perm) $ret.='<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit'.$htmlname.'&id='.$object->id.$moreparam.'">'.img_edit($langs->trans('Edit'),1).'</a></td>';
|
if (GETPOST('action') != 'edit'.$htmlname && $perm) $ret.='<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit'.$htmlname.'&id='.$object->id.$moreparam.'">'.img_edit($langs->trans('Edit'),1).'</a></td>';
|
||||||
$ret.='</tr></table>';
|
if (GETPOST('action') != 'edit'.$htmlname && $perm) $ret.='</tr></table>';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $ret;
|
return $ret;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user