diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index f2bcc410aa2..bddb4e665d3 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1693,7 +1693,7 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename = * @param string $name A name for the html component * @param string $label Label shown in Popup title top bar * @param string $buttonstring button string - * @param string $url Url to open + * @param string $url Relative Url to open * @param string $disabled Disabled text * @param string $morecss More CSS * @param string $backtopagejsfields The back to page must be managed using javascript instead of a redirect. @@ -1702,6 +1702,8 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename = */ function dolButtonToOpenUrlInDialogPopup($name, $label, $buttonstring, $url, $disabled = '', $morecss = 'button bordertransp', $backtopagejsfields = '') { + global $conf; + if (strpos($url, '?') > 0) { $url .= '&dol_hide_topmenu=1&dol_hide_leftmenu=1&dol_openinpopup='.urlencode($name); } else { @@ -1725,44 +1727,50 @@ function dolButtonToOpenUrlInDialogPopup($name, $label, $buttonstring, $url, $di } //print ''; - $out .= ''."\n"; - $out .= ''.$buttonstring.''; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''; + '; + } return $out; } diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index 29cfb898a2c..dd922e6cba4 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -2093,8 +2093,11 @@ if ($module == 'initmodule') { print ''.$langs->trans("IdModule").' '; print ''; - print '   ('.$langs->trans("SeeIDsInUse").''; - print ' - '.$langs->trans("SeeReservedIDsRangeHere").')'; + print '   ('; + print dolButtonToOpenUrlInDialogPopup('popup_modules_id', $langs->transnoentitiesnoconv("SeeIDsInUse"), $langs->transnoentitiesnoconv("SeeIDsInUse"), '/admin/system/modules.php?mainmenu=home&leftmenu=admintools_info', '', ''); + print ' - '; + print ''.$langs->trans("SeeReservedIDsRangeHere").''; + print ')'; print ''; print '
'; print ''.$langs->trans("Version").'
';