commit
d8de78dca9
@ -109,6 +109,7 @@ if ($dateselect > 0)
|
||||
}
|
||||
|
||||
$tmp=empty($conf->global->MAIN_DEFAULT_WORKING_HOURS)?'9-18':$conf->global->MAIN_DEFAULT_WORKING_HOURS;
|
||||
$tmp=str_replace(' ', '', $tmp); // FIX 7533
|
||||
$tmparray=explode('-', $tmp);
|
||||
$begin_h = GETPOST('begin_h', 'int')!=''?GETPOST('begin_h', 'int'):($tmparray[0] != '' ? $tmparray[0] : 9);
|
||||
$end_h = GETPOST('end_h', 'int')?GETPOST('end_h', 'int'):($tmparray[1] != '' ? $tmparray[1] : 18);
|
||||
@ -117,6 +118,7 @@ if ($end_h < 1 || $end_h > 24) $end_h = 18;
|
||||
if ($end_h <= $begin_h) $end_h = $begin_h + 1;
|
||||
|
||||
$tmp=empty($conf->global->MAIN_DEFAULT_WORKING_DAYS)?'1-5':$conf->global->MAIN_DEFAULT_WORKING_DAYS;
|
||||
$tmp=str_replace(' ', '', $tmp); // FIX 7533
|
||||
$tmparray=explode('-', $tmp);
|
||||
$begin_d = GETPOST('begin_d', 'int')?GETPOST('begin_d', 'int'):($tmparray[0] != '' ? $tmparray[0] : 1);
|
||||
$end_d = GETPOST('end_d', 'int')?GETPOST('end_d', 'int'):($tmparray[1] != '' ? $tmparray[1] : 5);
|
||||
|
||||
@ -6588,10 +6588,19 @@ abstract class CommonObject
|
||||
$out .= '<td class="';
|
||||
//$out .= "titlefield";
|
||||
//if (GETPOST('action', 'none') == 'create') $out.='create';
|
||||
if ($mode != 'view' && ! empty($extrafields->attributes[$this->table_element]['required'][$key])) $out .= ' fieldrequired';
|
||||
$out .= '">';
|
||||
if (! empty($extrafields->attributes[$this->table_element]['help'][$key])) $out .= $form->textwithpicto($labeltoshow, $extrafields->attributes[$this->table_element]['help'][$key]);
|
||||
else $out .= $labeltoshow;
|
||||
// BUG #11554 : For public page, use red dot for required fields, instead of bold label
|
||||
$context = isset($params["context"]) ? $params["context"] : "none";
|
||||
if ($context=="public") { // Public page : red dot instead of bold ble characters
|
||||
$out .= '">';
|
||||
if (! empty($extrafields->attributes[$this->table_element]['help'][$key])) $out .= $form->textwithpicto($labeltoshow, $extrafields->attributes[$this->table_element]['help'][$key]);
|
||||
else $out .= $labeltoshow;
|
||||
if ($mode != 'view' && ! empty($extrafields->attributes[$this->table_element]['required'][$key])) $out .= ' <font color="red">*</font>';
|
||||
} else {
|
||||
if ($mode != 'view' && ! empty($extrafields->attributes[$this->table_element]['required'][$key])) $out .= ' fieldrequired';
|
||||
$out .= '">';
|
||||
if (! empty($extrafields->attributes[$this->table_element]['help'][$key])) $out .= $form->textwithpicto($labeltoshow, $extrafields->attributes[$this->table_element]['help'][$key]);
|
||||
else $out .= $labeltoshow;
|
||||
}
|
||||
$out .= '</td>';
|
||||
|
||||
$html_id = !empty($this->id) ? $this->element.'_extras_'.$key.'_'.$this->id : '';
|
||||
|
||||
@ -41,7 +41,8 @@ $parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)) {
|
||||
print $object->showOptionals($extrafields, 'edit');
|
||||
$params = isset($tpl_context) ? array('context' => $tpl_context) : array(); // BUG #11554 : Add context in params
|
||||
print $object->showOptionals($extrafields, 'edit', $params); // BUG #11554 : Add context in params
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@ -645,6 +645,7 @@ print '<tr><td>'.$langs->trans("URLPhoto").'</td><td><input type="text" name="ph
|
||||
// Public
|
||||
print '<tr><td>'.$langs->trans("Public").'</td><td><input type="checkbox" name="public"></td></tr>'."\n";
|
||||
// Other attributes
|
||||
$tpl_context = 'public'; //BUG #11554 : define templae context to public
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
|
||||
// Comments
|
||||
print '<tr>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user