diff --git a/htdocs/langs/en_US/modulebuilder.lang b/htdocs/langs/en_US/modulebuilder.lang index bed3def3c38..75f1de02de2 100644 --- a/htdocs/langs/en_US/modulebuilder.lang +++ b/htdocs/langs/en_US/modulebuilder.lang @@ -107,7 +107,7 @@ PermissionsDefDesc=Define here the new permissions provided by your module MenusDefDescTooltip=The menus provided by your module/application are defined into the array $this->menus into the module descriptor file. You can edit manually this file or use the embedded editor.

Note: Once defined (and the module re-activated), the menus are also visible into the menu editor available to administrator users on %s. DictionariesDefDescTooltip=The dictionaries provided by your module/application are defined into the array $this->dictionaries into the module descriptor file. You can edit manually this file or use the embedded editor.

Note: Once defined (and module re-activated), dictionaries are also visible into the setup area to administrator users on %s. PermissionsDefDescTooltip=The permissions provided by your module/application are defined into the array $this->rights into the module descriptor file. You can edit manually this file or use the embedded editor.

Note: Once defined (and module re-activated), permissions are visible into the default permissions setup %s. -HooksDefDesc=Define in the module_parts['hooks'] property, in the module descriptor, the context of hooks you want to manage (list of contexts can be found by a search on 'initHooks(' in core code).
Edit the hook file to add code of your hooked functions (hookable functions can be found by a search on 'executeHooks' in core code). +HooksDefDesc=Define in the property module_parts['hooks'], in the module descriptor file, the list of contexts when your hook must be executed (the list of possible contexts can be found by a search on 'initHooks(' in core code).
Then edit the file with hooks code with the code of your hooked functions (the list of hookable functions can be found by a search on 'executeHooks' in core code). TriggerDefDesc=Define in the trigger file the code that you want to execute when a business event external to your module is executed (events triggered by other modules). SeeIDsInUse=See IDs in use in your installation SeeReservedIDsRangeHere=See range of reserved IDs diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index c54394687ca..8c5168725c8 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -5033,22 +5033,29 @@ if ($module == 'initmodule') { print '
'; print ''; + $htmltextenabled = ''.$langs->trans("Examples").':
'; + $htmltextenabled .= '1 (module always enabled)
'; + $htmltextenabled .= '0 (module always disabled)
'; + $htmltextenabled .= 'isModEnabled(\''.dol_escape_htmltag(strtolower($module)).'\') (enabled when module is enabled)'; + $htmltextperms = ''.$langs->trans("Examples").':
'; + $htmltextperms .= '1 (access always allowed)
'; + $htmltextperms .= '$user->hasright(\''.dol_escape_htmltag(strtolower($module)).'\', \'myobject\', \'read\') (access allowed if user has permission module->object->read)'; + print ''; print_liste_field_titre("#", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, 'center tdsticky tdstickygray '); print_liste_field_titre("Position", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); print_liste_field_titre("Title", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, 'center'); - print_liste_field_titre("LinkToParentMenu", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); + print_liste_field_titre("LinkToParentMenu", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, 'minwidth100 '); 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("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 ', $langs->trans('DetailEnabled')); - print_liste_field_titre("Rights", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, '', $langs->trans('DetailRight')); + print_liste_field_titre("Enabled", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, 'center ', $langs->trans('DetailEnabled').'

'.$htmltextenabled); + print_liste_field_titre("Rights", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, '', $langs->trans('DetailRight').'

'.$htmltextperms); 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, 'center ', $langs->trans('DetailUser')); + print_liste_field_titre("MenuForUsers", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, 'center minwidth100 ', $langs->trans('DetailUser')); print_liste_field_titre("", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, 'center ', $langs->trans('')); - print "\n"; $r = count($menus)+1; @@ -5072,18 +5079,14 @@ if ($module == 'initmodule') { print ''; print ''; print ''; - print ''; + // URL + print ''; print ''; // Position print ''; // Enabled print ''; - print ''; + // Position (top, left) print ''; - print ''; - print ''; + // Parent menu + print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + // URL + print ''; + print ''; // Position print ''; // Enabled @@ -5198,7 +5206,7 @@ if ($module == 'initmodule') { */ print ''; // Permissions - print ''; - print ''; + // Title print ''; - print ''; print ''; - print '';
'; print ''; - $htmltext = ''.$langs->trans("Examples").':
'; - $htmltext .= '1 (always enabled)
'; - $htmltext .= '0 (always disabled)
'; - $htmltext .= 'isModEnabled(\''.dol_escape_htmltag($module).'\') (enabled when module is enabled)
'; - print $form->textwithpicto('', $htmltext); /* print ''; print ''; print ''; + print ''; //print ''; print '
'; print $i; print ' '; - print ''; + /*print ''; + print '';*/ + print ''; print ''; + print ''; print ''; /* if (!empty($objPerms)) { @@ -5243,16 +5251,18 @@ if ($module == 'initmodule') { print $i; print ''; + print ''; print dol_escape_htmltag($menu['type']); print ''; print dol_escape_htmltag($menu['titre']); print ''; - print ($value == strtolower($module) ? '/' : $value); + // Parent menu + print ''; + print dol_escape_htmltag($menu['fk_menu']); print ''; @@ -5263,7 +5273,7 @@ if ($module == 'initmodule') { print dol_escape_htmltag($menu['leftmenu']); print ''; + print ''; print dol_escape_htmltag($menu['url']); print '