diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index fe8397b8816..be5a1283d73 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1718,7 +1718,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 Relative Url to open + * @param string $url Relative Url to open. For example '/project/card.php' * @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. @@ -1752,13 +1752,16 @@ function dolButtonToOpenUrlInDialogPopup($name, $label, $buttonstring, $url, $di } //print ''; - $out .= ''; + $out .= ''; $out .= 'use_javascript_ajax)) { $out .= ' href="'.DOL_URL_ROOT.$url.'" target="_blank"'; } $out .= '>'.$buttonstring.''; + if (!empty($conf->use_javascript_ajax)) { + // Add code to open url using the popup. Add also hidden field to retreive the returned variables + $out .= ''; $out .= ''; $out .= ''; $out .= ''; diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index e18f6987a33..b8443a065ff 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -1341,6 +1341,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print ''; print ''; print ''; + print ''; print ''; print ''; print '';