';
// Tick
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 965bca72824..f59e57d3516 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -7788,7 +7788,7 @@ class Form
$(document).ready(function() {
$("#checkallactions'.$id.'").click(function() {
if($(this).is(\':checked\')){
- console.log("We check all");
+ console.log("We check all '.$cssclass.'");
$(".'.$cssclass.'").prop(\'checked\', true).trigger(\'change\');
}
else
diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang
index 88e18c62943..0ea2940911b 100644
--- a/htdocs/langs/en_US/errors.lang
+++ b/htdocs/langs/en_US/errors.lang
@@ -236,6 +236,7 @@ ErrorBatchNoFoundForProductInWarehouse=No lot/serial found for product "%s" in w
ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this lot/serial for product "%s" in warehouse "%s".
ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded)
ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't user it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ?
+ErrorReplaceStringEmpty=Error, the string to replace into is empty
# Warnings
WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup.
WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user.
diff --git a/htdocs/website/index.php b/htdocs/website/index.php
index 629e4b91584..c724ab4e3cf 100644
--- a/htdocs/website/index.php
+++ b/htdocs/website/index.php
@@ -369,7 +369,11 @@ if (($action == 'replacesite' || $action == 'replacesiteconfirm') && ! $searchke
if ($massaction == 'replace')
{
$replacestring = GETPOST('replacestring', 'alphanohtml');
- if (! $replacestring) {
+
+ if (empty($user->rights->website->writephp)) {
+ setEventMessages("NotAllowedToAddDynamicContent", null, 'errors');
+ }
+ elseif (! $replacestring) {
setEventMessages("ErrorReplaceStringEmpty", null, 'errors');
}
else {
@@ -3531,12 +3535,8 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction =
$permissiontodelete = 0;
// List of mass actions available
- $arrayofmassactions = array(
- //'validate'=>$langs->trans("Validate"),
- //'generate_doc'=>$langs->trans("ReGeneratePDF"),
- //'builddoc'=>$langs->trans("PDFMerge"),
- 'replace'=>$langs->trans("Replace"),
- );
+ $arrayofmassactions = array();
+ if ($user->rights->website->writephp) $arrayofmassactions['replace'] = $langs->trans("Replace");
if ($permissiontodelete) $arrayofmassactions['predelete'] = ''.$langs->trans("Delete");
if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array();
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);