Clean code
This commit is contained in:
parent
80d06e7a66
commit
839c535774
@ -8096,8 +8096,13 @@ abstract class CommonObject
|
|||||||
//if (GETPOST('action', 'restricthtml') == 'create') $out.='create';
|
//if (GETPOST('action', 'restricthtml') == 'create') $out.='create';
|
||||||
// BUG #11554 : For public page, use red dot for required fields, instead of bold label
|
// BUG #11554 : For public page, use red dot for required fields, instead of bold label
|
||||||
$tpl_context = isset($params["tpl_context"]) ? $params["tpl_context"] : "none";
|
$tpl_context = isset($params["tpl_context"]) ? $params["tpl_context"] : "none";
|
||||||
|
if ($tpl_context != "public") { // Public page : red dot instead of fieldrequired characters
|
||||||
|
if ($mode != 'view' && !empty($extrafields->attributes[$this->table_element]['required'][$key])) {
|
||||||
|
$out .= ' fieldrequired';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$out .= '">';
|
||||||
if ($tpl_context == "public") { // Public page : red dot instead of fieldrequired characters
|
if ($tpl_context == "public") { // Public page : red dot instead of fieldrequired characters
|
||||||
$out .= '">';
|
|
||||||
if (!empty($extrafields->attributes[$this->table_element]['help'][$key])) {
|
if (!empty($extrafields->attributes[$this->table_element]['help'][$key])) {
|
||||||
$out .= $form->textwithpicto($labeltoshow, $helptoshow);
|
$out .= $form->textwithpicto($labeltoshow, $helptoshow);
|
||||||
} else {
|
} else {
|
||||||
@ -8107,10 +8112,6 @@ abstract class CommonObject
|
|||||||
$out .= ' <span style="color: red">*</span>';
|
$out .= ' <span style="color: red">*</span>';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ($mode != 'view' && !empty($extrafields->attributes[$this->table_element]['required'][$key])) {
|
|
||||||
$out .= ' fieldrequired';
|
|
||||||
}
|
|
||||||
$out .= '">';
|
|
||||||
if (!empty($extrafields->attributes[$this->table_element]['help'][$key])) {
|
if (!empty($extrafields->attributes[$this->table_element]['help'][$key])) {
|
||||||
$out .= $form->textwithpicto($labeltoshow, $helptoshow);
|
$out .= $form->textwithpicto($labeltoshow, $helptoshow);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user