diff --git a/htdocs/langs/en_US/modulebuilder.lang b/htdocs/langs/en_US/modulebuilder.lang
index 7ba539d3bd4..6376024ea0b 100644
--- a/htdocs/langs/en_US/modulebuilder.lang
+++ b/htdocs/langs/en_US/modulebuilder.lang
@@ -143,4 +143,7 @@ AsciiToHtmlConverter=Ascii to HTML converter
AsciiToPdfConverter=Ascii to PDF converter
TableNotEmptyDropCanceled=Table not empty. Drop has been canceled.
ModuleBuilderNotAllowed=The module builder is available but not allowed to your user.
-ImportExportProfiles=Import and export profiles
\ No newline at end of file
+ImportExportProfiles=Import and export profiles
+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 82567e05fac..16671ddf137 100644
--- a/htdocs/modulebuilder/index.php
+++ b/htdocs/modulebuilder/index.php
@@ -1931,6 +1931,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';
@@ -3902,6 +3907,128 @@ 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 '