diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 5414bf897d9..fa9900f93b0 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -9498,6 +9498,8 @@ class Form
}
}
+ $out .= '';
+
// We need a hidden field because when using the multiselect, if we unselect all, there is no
// variable submitted at all, so no way to make a difference between variable not submitted and variable
// submitted to nothing.
@@ -9544,21 +9546,35 @@ class Form
}
$out .= '' . "\n";
+ // Add js code to add the edit button and go back
+ if (getDolGlobalString('CATEGORY_EDIT_IN_POPUP_NOT_IN_MENU')) {
+ $jsonclose = 'doJsCodeAfterPopupClose'.$htmlname.'()';
+ $s = dolButtonToOpenUrlInDialogPopup($htmlname, $langs->transnoentitiesnoconv("Tags"), img_picto('', 'add', 'class="editfielda"'), '/categories/categorie_list.php?type='.Categorie::TYPE_CUSTOMER, '', '', '', $jsonclose);
+ $out .= $s;
+ $out .='';
+ }
+
+ $out .= '';
+
// Add code for jquery to use multiselect
if (!empty($conf->use_javascript_ajax) && getDolGlobalString('MAIN_USE_JQUERY_MULTISELECT') || defined('REQUIRE_JQUERY_MULTISELECT')) {
$out .= "\n" . '';
$out .= "\n" . '