diff --git a/htdocs/langs/en_US/modulebuilder.lang b/htdocs/langs/en_US/modulebuilder.lang
index 5466900bbe0..df0a834e04f 100644
--- a/htdocs/langs/en_US/modulebuilder.lang
+++ b/htdocs/langs/en_US/modulebuilder.lang
@@ -146,4 +146,7 @@ ModuleBuilderNotAllowed=The module builder is available but not allowed to your
ImportExportProfiles=Import and export profiles
ValidateModBuilderDesc=Set this to 1 if you want to have the method $this->validateField() of object being called to validate the content of the field during insert or upadate. Set 0 if there is no validation required.
WarningDatabaseIsNotUpdated=Warning: The database is not updated automatically, you must destroy tables and disable-enable the module to have tables recreated
-LinkToParentMenu=Parent menu (fk_xxxxmenu)
\ No newline at end of file
+LinkToParentMenu=Parent menu (fk_xxxxmenu)
+ListOfTabsEntries=List of tab entries
+TabsDefDesc=Define here the tabs provided by your module
+TabsDefDescTooltip=The tabs provided by your module/application are defined into the array $this->tabs into the module descriptor file. You can edit manually this file or use the embedded editor.
diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php
index 7389e2ea7a5..8b5b171265c 100644
--- a/htdocs/modulebuilder/index.php
+++ b/htdocs/modulebuilder/index.php
@@ -2015,6 +2015,11 @@ if ($module == 'initmodule') {
$head2[$h][2] = 'permissions';
$h++;
+ $head2[$h][0] = $_SERVER["PHP_SELF"].'?tab=tabs&module='.$module.($forceddirread ? '@'.$dirread : '');
+ $head2[$h][1] = $langs->trans("Tabs");
+ $head2[$h][2] = 'tabs';
+ $h++;
+
$head2[$h][0] = $_SERVER["PHP_SELF"].'?tab=menus&module='.$module.($forceddirread ? '@'.$dirread : '');
$head2[$h][1] = $langs->trans("Menus");
$head2[$h][2] = 'menus';
@@ -4032,6 +4037,129 @@ if ($module == 'initmodule') {
print '';
}
+ if ($tab == 'tabs') {
+ $pathtofile = $listofmodules[strtolower($module)]['moduledescriptorrelpath'];
+
+ $tabs = $moduleobj->tabs;
+
+ if ($action != 'editfile' || empty($file)) {
+ print '';
+ $htmlhelp = $langs->trans("TabsDefDescTooltip", '{s1}');
+ $htmlhelp = str_replace('{s1}', ''.$langs->trans('Setup').' - '.$langs->trans('Tabs').'', $htmlhelp);
+ print $form->textwithpicto($langs->trans("TabsDefDesc"), $htmlhelp, 1, 'help', '', 0, 2, 'helpondesc').'
';
+ print '';
+ print '
';
+
+ print ' '.$langs->trans("DescriptorFile").' : '.$pathtofile.'';
+ print ' '.img_picto($langs->trans("Edit"), 'edit').'';
+ print '
';
+
+ print '
';
+ print load_fiche_titre($langs->trans("ListOfTabsEntries"), '', '');
+
+ print '