Maxi debug of 3.8. Nearly ready for freeze.

This commit is contained in:
Laurent Destailleur
2015-06-05 14:02:50 +02:00
parent 4c7ccf6145
commit 5e2d9efa07
5 changed files with 167 additions and 94 deletions

View File

@@ -831,6 +831,25 @@ function dol_get_fiche_end($notab=0)
else return '';
}
/**
* Show a string with the label tag dedicated to the HTML edit field.
*
* @param string $langkey Translation key
* @param string $fieldkey Key of the html select field the text refers to
* @param int $fieldrequired 1=Field is mandatory
*/
function fieldLabel($langkey, $fieldkey, $fieldrequired=0)
{
global $conf, $langs;
$ret='';
if ($fieldrequired) $ret.='<span class="fieldrequired">';
if (empty($conf->dol_use_jmobile)) $ret.='<label for="'.$fieldkey.'">';
$ret.=$langs->trans($langkey);
if (empty($conf->dol_use_jmobile)) $ret.='</label>';
if ($fieldrequired) $ret.='</span>';
return $ret;
}
/**
* Return string to add class property on html element with pair/impair.
*