diff --git a/CHANGELOG.md b/CHANGELOG.md index 964ef75e86..fc24b23a15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [Unreleased] + +### Changed + +- Make the plugin compatible with the Content Security Policy (requires the GLPI release with CSP support) + ## [2.12.12] - 2026-10-06 ### Fixed diff --git a/inc/bill.class.php b/inc/bill.class.php index 773f982e62..3f5ac4aa3c 100644 --- a/inc/bill.class.php +++ b/inc/bill.class.php @@ -360,8 +360,7 @@ public static function showOrder($data_ref, $result_ref, $canedit, $order, $refe $itemtype = $data_ref["itemtype"]; $item = getItemForItemtype($itemtype); echo "
| "; - echo sprintf("" . __s("Check all") . " | "; + echo sprintf("", $rand) + . __s("Check all") . ""; echo "/ | "; - echo sprintf("" . __s("Uncheck all") . ""; + echo sprintf("", $rand) + . __s("Uncheck all") . ""; echo " | ";
echo Html::hidden('plugin_order_orders_id', ['value' => $order->getID()]);
$order_item->dropdownBillItemsActions($order->getID());
diff --git a/inc/order.class.php b/inc/order.class.php
index b655b1d0be..70677bb81b 100644
--- a/inc/order.class.php
+++ b/inc/order.class.php
@@ -1696,9 +1696,9 @@ public function showValidationForm($orders_id)
$link = "";
if ($this->canCancelOrder()) {
- echo "";
+ . "\" name='cancel_order' value=\"" . __s("Cancel order", "order") . "\" class='submit'>";
$link = " "; } @@ -1709,9 +1709,9 @@ public function showValidationForm($orders_id) } if ($this->canCancelValidationRequest()) { - echo $link . ""; $link = " "; } @@ -1723,9 +1723,9 @@ public function showValidationForm($orders_id) } if ($this->canUndoValidation()) { - echo $link . ""; $link = " "; } diff --git a/inc/order_item.class.php b/inc/order_item.class.php index 7d5bd9bc3e..c0d38db70d 100644 --- a/inc/order_item.class.php +++ b/inc/order_item.class.php @@ -650,7 +650,8 @@ public function showAddForm($plugin_order_orders_id) } };"); - echo ""; + echo ""; + echo Html::scriptBlock('$("#addreference").on("click", function () { plugin_order_checkboxAction(); });'); echo " | ";
echo "