Clean code
This commit is contained in:
parent
9a2ef34af5
commit
50169bc96a
@ -295,11 +295,13 @@ if ($action == 'create') {
|
||||
|
||||
// User
|
||||
print '<tr><td class="nowrap fieldrequired">'.$langs->trans('MenuForUsers').'</td>';
|
||||
print '<td><select class="flat" name="user">';
|
||||
print '<td><select class="flat" name="user" id="menuuser">';
|
||||
print '<option value="2" selected>'.$langs->trans("AllMenus").'</option>';
|
||||
print '<option value="0">'.$langs->trans('Internal').'</option>';
|
||||
print '<option value="1">'.$langs->trans('External').'</option>';
|
||||
print '</select></td>';
|
||||
print '</select>';
|
||||
print ajax_combobox('menuuser');
|
||||
print '</td>';
|
||||
print '<td>'.$langs->trans('DetailUser').'</td></tr>';
|
||||
|
||||
// Type
|
||||
@ -392,7 +394,7 @@ if ($action == 'create') {
|
||||
print '<tr><td>'.$langs->trans('Id').'</td><td>'.$menu->id.'</td><td>'.$langs->trans('DetailId').'</td></tr>';
|
||||
|
||||
// Module
|
||||
print '<tr><td>'.$langs->trans('MenuModule').'</td><td>'.$menu->module.'</td><td>'.$langs->trans('DetailMenuModule').'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('MenuModule').'</td><td>'.(empty($menu->module) ? 'Core' : $menu->module).'</td><td><span class="opacitymedium">'.$langs->trans('DetailMenuModule').'</span></td></tr>';
|
||||
|
||||
// Handler
|
||||
if ($menu->menu_handler == 'all') {
|
||||
@ -403,14 +405,17 @@ if ($action == 'create') {
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('MenuHandler').'</td><td>'.$handler.'</td><td>'.$langs->trans('DetailMenuHandler').'</td></tr>';
|
||||
|
||||
// User
|
||||
print '<tr><td class="nowrap fieldrequired">'.$langs->trans('MenuForUsers').'</td><td><select class="flat" name="user">';
|
||||
print '<tr><td class="nowrap fieldrequired">'.$langs->trans('MenuForUsers').'</td><td>';
|
||||
print '<select class="flat" name="user" id="menuuser">';
|
||||
print '<option value="2"'.($menu->user == 2 ? ' selected' : '').'>'.$langs->trans("AllMenus").'</option>';
|
||||
print '<option value="0"'.($menu->user == 0 ? ' selected' : '').'>'.$langs->trans('Internal').'</option>';
|
||||
print '<option value="1"'.($menu->user == 1 ? ' selected' : '').'>'.$langs->trans('External').'</option>';
|
||||
print '</select></td><td>'.$langs->trans('DetailUser').'</td></tr>';
|
||||
print '</select>';
|
||||
print ajax_combobox('menuuser');
|
||||
print '</td><td>'.$langs->trans('DetailUser').'</td></tr>';
|
||||
|
||||
// Type
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('Type').'</td>';
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('Position').'</td>';
|
||||
print '<td>'.$langs->trans(ucfirst($menu->type)).'</td><td>'.$langs->trans('DetailType').'</td></tr>';
|
||||
|
||||
// Mainmenu code
|
||||
@ -463,12 +468,6 @@ if ($action == 'create') {
|
||||
print '<tr><td>'.$langs->trans('Position').'</td>';
|
||||
print '<td><input type="text" class="minwidth100" name="position" value="'.$menu->position.'"></td><td>'.$langs->trans('DetailPosition').'</td></tr>';
|
||||
|
||||
// Target
|
||||
print '<tr><td>'.$langs->trans('Target').'</td><td><select class="flat" name="target">';
|
||||
print '<option value=""'.($menu->target == "" ? ' selected' : '').'> </option>';
|
||||
print '<option value="_blank"'.($menu->target == "_blank" ? ' selected' : '').'>'.$langs->trans('_blank').'</option>';
|
||||
print '</select></td><td>'.$langs->trans('DetailTarget').'</td></tr>';
|
||||
|
||||
// Enabled
|
||||
print '<tr><td>'.$langs->trans('Enabled').'</td>';
|
||||
print '<td><input type="text" class="minwidth500" name="enabled" value="'.dol_escape_htmltag($menu->enabled).'"></td><td>'.$langs->trans('DetailEnabled');
|
||||
@ -485,6 +484,14 @@ if ($action == 'create') {
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Target
|
||||
print '<tr><td>'.$langs->trans('Target').'</td><td><select class="flat" id="target" name="target">';
|
||||
print '<option value=""'.($menu->target == "" ? ' selected' : '').'> </option>';
|
||||
print '<option value="_blank"'.($menu->target == "_blank" ? ' selected' : '').'>'.$langs->trans('_blank').'</option>';
|
||||
print '</select>';
|
||||
print ajax_combobox("target");
|
||||
print '</td><td>'.$langs->trans('DetailTarget').'</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
@ -5118,8 +5118,12 @@ function getTitleFieldOfList($name, $thead = 0, $file = "", $field = "", $begin
|
||||
$out .= '>';
|
||||
}
|
||||
if ($tooltip) {
|
||||
// You can also use 'TranslationString:keyfortooltiponlick' for a tooltip on click.
|
||||
$tmptooltip = explode(':', $tooltip);
|
||||
// You can also use 'TranslationString:keyfortooltiponclick' for a tooltip on click.
|
||||
if (preg_match('/:\w+$/', $tooltip)) {
|
||||
$tmptooltip = explode(':', $tooltip);
|
||||
} else {
|
||||
$tmptooltip = array($tooltip);
|
||||
}
|
||||
$out .= $form->textwithpicto($langs->trans($name), $langs->trans($tmptooltip[0]), 1, 'help', '', 0, 3, (empty($tmptooltip[1]) ? '' : 'extra_'.str_replace('.', '_', $field).'_'.$tmptooltip[1]));
|
||||
} else {
|
||||
$out .= $langs->trans($name);
|
||||
|
||||
@ -1767,7 +1767,7 @@ DetailMenuHandler=Menu handler where to show new menu
|
||||
DetailMenuModule=Module name if menu entry come from a module
|
||||
DetailType=Type of menu (top or left)
|
||||
DetailTitre=Menu label or label code for translation
|
||||
DetailUrl=URL where menu send you (Absolute URL link or external link with http://)
|
||||
DetailUrl=URL where menu send you (Relative URL link or external link with https://)
|
||||
DetailEnabled=Condition to show or not entry
|
||||
DetailRight=Condition to display unauthorized grey menus
|
||||
DetailLangs=Lang file name for label code translation
|
||||
|
||||
@ -50,6 +50,7 @@ PathToModulePackage=Path to zip of module/application package
|
||||
PathToModuleDocumentation=Path to file of module/application documentation (%s)
|
||||
SpaceOrSpecialCharAreNotAllowed=Spaces or special characters are not allowed.
|
||||
FileNotYetGenerated=File not yet generated
|
||||
GenerateCode=Generate code
|
||||
RegenerateClassAndSql=Force update of .class and .sql files
|
||||
RegenerateMissingFiles=Generate missing files
|
||||
SpecificationFile=File of documentation
|
||||
|
||||
@ -2090,10 +2090,12 @@ if ($module == 'initmodule') {
|
||||
//print '<span class="opacitymedium">'.$langs->trans("ModuleBuilderDesc2", 'conf/conf.php', $newdircustom).'</span><br>';
|
||||
print '<br>';
|
||||
|
||||
print '<span class="opacitymedium">'.$langs->trans("ModuleName").'</span> <input type="text" name="modulename" value="'.dol_escape_htmltag($modulename).'" autofocus>';
|
||||
print ' '.$form->textwithpicto('', $langs->trans("EnterNameOfModuleDesc")).'<br>';
|
||||
print '<div class="tagtable">';
|
||||
|
||||
print '<span class="opacitymedium">'.$langs->trans("IdModule").'</span> <input type="text" name="idmodule" class="width75" value="500000" placeholder="'.dol_escape_htmltag($langs->trans("IdModule")).'">';
|
||||
print '<div class="tagtr"><div class="tagtd">';
|
||||
print '<span class="opacitymedium">'.$langs->trans("IdModule").'</span>';
|
||||
print '</div><div class="tagtd">';
|
||||
print '<input type="text" name="idmodule" class="width75" value="500000" placeholder="'.dol_escape_htmltag($langs->trans("IdModule")).'">';
|
||||
print '<span class="opacitymedium">';
|
||||
print ' (';
|
||||
print dolButtonToOpenUrlInDialogPopup('popup_modules_id', $langs->transnoentitiesnoconv("SeeIDsInUse"), $langs->transnoentitiesnoconv("SeeIDsInUse"), '/admin/system/modules.php?mainmenu=home&leftmenu=admintools_info', '', '');
|
||||
@ -2101,9 +2103,30 @@ if ($module == 'initmodule') {
|
||||
print '<a href="https://wiki.dolibarr.org/index.php/List_of_modules_id" target="_blank" rel="noopener noreferrer external">'.$langs->trans("SeeReservedIDsRangeHere").'</a>';
|
||||
print ')';
|
||||
print '</span>';
|
||||
print '<br>';
|
||||
print '<span class="opacitymedium">'.$langs->trans("Version").'</span> <input type="text" name="version" class="width75" value="1.0" placeholder="'.dol_escape_htmltag($langs->trans("Version")).'"><br>';
|
||||
print '<span class="opacitymedium">'.$langs->trans("Family").'</span> ';
|
||||
print '</div></div>';
|
||||
|
||||
print '<div class="tagtr"><div class="tagtd">';
|
||||
print '<span class="opacitymedium">'.$langs->trans("ModuleName").'</span>';
|
||||
print '</div><div class="tagtd">';
|
||||
print '<input type="text" name="modulename" value="'.dol_escape_htmltag($modulename).'" autofocus>';
|
||||
print ' '.$form->textwithpicto('', $langs->trans("EnterNameOfModuleDesc"));
|
||||
print '</div></div>';
|
||||
|
||||
print '<div class="tagtr"><div class="tagtd">';
|
||||
print '<span class="opacitymedium">'.$langs->trans("Description").'</span>';
|
||||
print '</div><div class="tagtd">';
|
||||
print '<input type="text" name="description" value="" class="minwidth500"><br>';
|
||||
print '</div></div>';
|
||||
|
||||
print '<div class="tagtr"><div class="tagtd">';
|
||||
print '<span class="opacitymedium">'.$langs->trans("Version").'</span>';
|
||||
print '</div><div class="tagtd">';
|
||||
print '<input type="text" name="version" class="width75" value="1.0" placeholder="'.dol_escape_htmltag($langs->trans("Version")).'">';
|
||||
print '</div></div>';
|
||||
|
||||
print '<div class="tagtr"><div class="tagtd">';
|
||||
print '<span class="opacitymedium">'.$langs->trans("Family").'</span>';
|
||||
print '</div><div class="tagtd">';
|
||||
print '<select name="family" id="family" class="minwidth400">';
|
||||
print '<option value="hr">'.$langs->trans("ModuleFamilyHr").'</option>';
|
||||
print '<option value="crm">'.$langs->trans("ModuleFamilyCrm").'</option>';
|
||||
@ -2117,15 +2140,28 @@ if ($module == 'initmodule') {
|
||||
print '<option value="interface">'.$langs->trans("ModuleFamilyInterface").'</option>';
|
||||
print '<option value="base">'.$langs->trans("ModuleFamilyBase").'</option>';
|
||||
print '<option value="other" selected="">'.$langs->trans("ModuleFamilyOther").'</option>';
|
||||
print '</select><br>';
|
||||
print '</select>';
|
||||
print ajax_combobox("family");
|
||||
print '<span class="opacitymedium">'.$langs->trans("Picto").'</span> <input type="text" name="idpicto" value="fa-generic" placeholder="'.dol_escape_htmltag($langs->trans("Picto")).'">';
|
||||
print $form->textwithpicto('', $langs->trans("Example").': fa-generic, fa-globe, ... any font awesome code.<br>Advanced syntax is fa-fakey[_faprefix[_facolor[_fasize]]]');
|
||||
print '<br>';
|
||||
print '<span class="opacitymedium">'.$langs->trans("Description").'</span> <input type="text" name="description" value="" class="minwidth500"><br>';
|
||||
print '</div></div>';
|
||||
|
||||
print '<span class="opacitymedium">'.$langs->trans("EditorName").'</span> <input type="text" name="editorname" value="'.$mysoc->name.'" placeholder="'.dol_escape_htmltag($langs->trans("EditorName")).'"><br>';
|
||||
print '<span class="opacitymedium">'.$langs->trans("EditorUrl").'</span> <input type="text" name="editorurl" value="'.$mysoc->url.'" placeholder="'.dol_escape_htmltag($langs->trans("EditorUrl")).'"><br>';
|
||||
print '<div class="tagtr"><div class="tagtd">';
|
||||
print '<span class="opacitymedium">'.$langs->trans("Picto").'</span>';
|
||||
print '</div><div class="tagtd">';
|
||||
print '<input type="text" name="idpicto" value="fa-generic" placeholder="'.dol_escape_htmltag($langs->trans("Picto")).'">';
|
||||
print $form->textwithpicto('', $langs->trans("Example").': fa-generic, fa-globe, ... any font awesome code.<br>Advanced syntax is fa-fakey[_faprefix[_facolor[_fasize]]]');
|
||||
print '</div></div>';
|
||||
|
||||
print '<div class="tagtr"><div class="tagtd">';
|
||||
print '<span class="opacitymedium">'.$langs->trans("EditorName").'</span>';
|
||||
print '</div><div class="tagtd">';
|
||||
print '<input type="text" name="editorname" value="'.$mysoc->name.'" placeholder="'.dol_escape_htmltag($langs->trans("EditorName")).'"><br>';
|
||||
print '</div></div>';
|
||||
|
||||
print '<div class="tagtr"><div class="tagtd">';
|
||||
print '<span class="opacitymedium">'.$langs->trans("EditorUrl").'</span>';
|
||||
print '</div><div class="tagtd">';
|
||||
print '<input type="text" name="editorurl" value="'.$mysoc->url.'" placeholder="'.dol_escape_htmltag($langs->trans("EditorUrl")).'"><br>';
|
||||
print '</div></div>';
|
||||
|
||||
print '<br><input type="submit" class="button" name="create" value="'.dol_escape_htmltag($langs->trans("Create")).'"'.($dirins ? '' : ' disabled="disabled"').'>';
|
||||
print '</form>';
|
||||
@ -2273,7 +2309,7 @@ if ($module == 'initmodule') {
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
print load_fiche_titre($form->textwithpicto($langs->trans("DescriptorFile"), $pathtofile), '', '');
|
||||
print load_fiche_titre($form->textwithpicto($langs->trans("DescriptorFile"), $langs->transnoentitiesnoconv("File").' '.$pathtofile), '', '');
|
||||
|
||||
if (!empty($moduleobj)) {
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
@ -2287,7 +2323,7 @@ if ($module == 'initmodule') {
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>';
|
||||
print $langs->trans("Numero");
|
||||
print $langs->trans("IdModule");
|
||||
print '</td><td>';
|
||||
print $moduleobj->numero;
|
||||
print '<span class="opacitymedium">';
|
||||
@ -2297,11 +2333,17 @@ if ($module == 'initmodule') {
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>';
|
||||
print $langs->trans("Name");
|
||||
print $langs->trans("ModuleName");
|
||||
print '</td><td>';
|
||||
print $moduleobj->getName();
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>';
|
||||
print $langs->trans("Description");
|
||||
print '</td><td>';
|
||||
print $moduleobj->getDesc();
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>';
|
||||
print $langs->trans("Version");
|
||||
print '</td><td>';
|
||||
@ -2322,12 +2364,6 @@ if ($module == 'initmodule') {
|
||||
print ' '.img_picto('', $moduleobj->picto, 'class="valignmiddle pictomodule paddingrightonly"');
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>';
|
||||
print $langs->trans("Description");
|
||||
print '</td><td>';
|
||||
print $moduleobj->getDesc();
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>';
|
||||
print $langs->trans("EditorName");
|
||||
print '</td><td>';
|
||||
@ -2351,7 +2387,7 @@ if ($module == 'initmodule') {
|
||||
print '<br><br>';
|
||||
|
||||
// Readme file
|
||||
print load_fiche_titre($form->textwithpicto($langs->trans("ReadmeFile"), $pathtofilereadme), '', '');
|
||||
print load_fiche_titre($form->textwithpicto($langs->trans("ReadmeFile"), $langs->transnoentitiesnoconv("File").' '.$pathtofilereadme), '', '');
|
||||
|
||||
print '<!-- readme file -->';
|
||||
if (dol_is_file($dirread.'/'.$pathtofilereadme)) {
|
||||
@ -2363,7 +2399,7 @@ if ($module == 'initmodule') {
|
||||
print '<br><br>';
|
||||
|
||||
// ChangeLog
|
||||
print load_fiche_titre($form->textwithpicto($langs->trans("ChangeLog"), $pathtochangelog), '', '');
|
||||
print load_fiche_titre($form->textwithpicto($langs->trans("ChangeLog"), $langs->transnoentitiesnoconv("File").' '.$pathtochangelog), '', '');
|
||||
|
||||
print '<!-- changelog file -->';
|
||||
if (dol_is_file($dirread.'/'.$pathtochangelog)) {
|
||||
@ -2555,7 +2591,7 @@ if ($module == 'initmodule') {
|
||||
print '<input type="text" name="objectname" maxlength="64" value="'.dol_escape_htmltag(GETPOST('objectname', 'alpha') ? GETPOST('objectname', 'alpha') : $modulename).'" placeholder="'.dol_escape_htmltag($langs->trans("ObjectKey")).'" autofocus><br>';
|
||||
print '<input type="checkbox" name="includerefgeneration" id="includerefgeneration" value="includerefgeneration"> <label for="includerefgeneration">'.$form->textwithpicto($langs->trans("IncludeRefGeneration"), $langs->trans("IncludeRefGenerationHelp")).'</label><br>';
|
||||
print '<input type="checkbox" name="includedocgeneration" id="includedocgeneration" value="includedocgeneration"> <label for="includedocgeneration">'.$form->textwithpicto($langs->trans("IncludeDocGeneration"), $langs->trans("IncludeDocGenerationHelp")).'</label><br>';
|
||||
print '<input type="submit" class="button smallpaddingimp" name="create" value="'.dol_escape_htmltag($langs->trans("Generate")).'"'.($dirins ? '' : ' disabled="disabled"').'>';
|
||||
print '<input type="submit" class="button smallpaddingimp" name="create" value="'.dol_escape_htmltag($langs->trans("GenerateCode")).'"'.($dirins ? '' : ' disabled="disabled"').'>';
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
@ -2565,7 +2601,7 @@ if ($module == 'initmodule') {
|
||||
//print '<input type="checkbox" name="initfromtablecheck"> ';
|
||||
print $langs->trans("InitStructureFromExistingTable");
|
||||
print '<input type="text" name="initfromtablename" value="" placeholder="'.$langs->trans("TableName").'">';
|
||||
print '<input type="submit" class="button smallpaddingimp" name="createtablearray" value="'.dol_escape_htmltag($langs->trans("Generate")).'"'.($dirins ? '' : ' disabled="disabled"').'>';
|
||||
print '<input type="submit" class="button smallpaddingimp" name="createtablearray" value="'.dol_escape_htmltag($langs->trans("GenerateCode")).'"'.($dirins ? '' : ' disabled="disabled"').'>';
|
||||
print '<br>';
|
||||
|
||||
print '</form>';
|
||||
@ -3373,7 +3409,7 @@ if ($module == 'initmodule') {
|
||||
print '<input type="text" name="dicname" maxlength="64" value="'.dol_escape_htmltag(GETPOST('dicname', 'alpha') ? GETPOST('dicname', 'alpha') : $modulename).'" placeholder="'.dol_escape_htmltag($langs->trans("DicKey")).'" autofocus><br>';
|
||||
//print '<input type="checkbox" name="includerefgeneration" id="includerefgeneration" value="includerefgeneration"> <label for="includerefgeneration">'.$form->textwithpicto($langs->trans("IncludeRefGeneration"), $langs->trans("IncludeRefGenerationHelp")).'</label><br>';
|
||||
//print '<input type="checkbox" name="includedocgeneration" id="includedocgeneration" value="includedocgeneration"> <label for="includedocgeneration">'.$form->textwithpicto($langs->trans("IncludeDocGeneration"), $langs->trans("IncludeDocGenerationHelp")).'</label><br>';
|
||||
print '<input type="submit" class="button smallpaddingimp" name="create" value="'.dol_escape_htmltag($langs->trans("Generate")).'"'.($dirins ? '' : ' disabled="disabled"').'>';
|
||||
print '<input type="submit" class="button smallpaddingimp" name="create" value="'.dol_escape_htmltag($langs->trans("GenerateCode")).'"'.($dirins ? '' : ' disabled="disabled"').'>';
|
||||
/*print '<br>';
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
@ -3383,7 +3419,7 @@ if ($module == 'initmodule') {
|
||||
//print '<input type="checkbox" name="initfromtablecheck"> ';
|
||||
print $langs->trans("InitStructureFromExistingTable");
|
||||
print '<input type="text" name="initfromtablename" value="" placeholder="'.$langs->trans("TableName").'">';
|
||||
print '<input type="submit" class="button smallpaddingimp" name="createtablearray" value="'.dol_escape_htmltag($langs->trans("Generate")).'"'.($dirins ? '' : ' disabled="disabled"').'>';
|
||||
print '<input type="submit" class="button smallpaddingimp" name="createtablearray" value="'.dol_escape_htmltag($langs->trans("GenerateCode")).'"'.($dirins ? '' : ' disabled="disabled"').'>';
|
||||
print '<br>';
|
||||
*/
|
||||
print '</form>';
|
||||
@ -3464,18 +3500,18 @@ if ($module == 'initmodule') {
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("#", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, 'thsticky ');
|
||||
print_liste_field_titre("Type", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Position", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("LinkToParentMenu", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Title", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("mainmenu", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("leftmenu", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("RelativeURL", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("URL", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, '', $langs->transnoentitiesnoconv('DetailUrl'));
|
||||
print_liste_field_titre("LanguageFile", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Position", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("Enabled", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("Permission", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Target", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("UserType", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("Enabled", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, 'center ', $langs->trans('DetailEnabled'));
|
||||
print_liste_field_titre("Rights", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, '', $langs->trans('DetailRight'));
|
||||
print_liste_field_titre("Target", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, '', $langs->trans('DetailTarget'));
|
||||
print_liste_field_titre("MenuForUsers", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, 'right ', $langs->trans('DetailUser'));
|
||||
print "</tr>\n";
|
||||
|
||||
if (count($menus)) {
|
||||
@ -3534,7 +3570,15 @@ if ($module == 'initmodule') {
|
||||
print '</td>';
|
||||
|
||||
print '<td class="right">';
|
||||
print dol_escape_htmltag($menu['user']);
|
||||
if ($menu['user'] == 2) {
|
||||
print $langs->trans("AllMenus");
|
||||
} elseif ($menu['user'] == 0) {
|
||||
print $langs->trans('Internal');
|
||||
} elseif ($menu['user'] == 1) {
|
||||
print $langs->trans('External');
|
||||
} else {
|
||||
print $menu['user']; // should not happen
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
print '</tr>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user