Bug 38365: Add CSP nonces to all inline script and style tags

Signed-off-by: Lari Taskula <lari.taskula@hypernova.fi>

Amended-by: Jonathan Druart
Regenerated the patch on top of bug 41324, using:
perl misc/devel/add_csp_nonces.pl --apply
============================================================
Summary:
  Files scanned:  881
  Files modified: 456
  Tags modified:  800
============================================================

Also note that this manual change:
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authoritiessearchresultlist.tt
-    <script type="text/JavaScript">
+    <script nonce="[% Koha.CSPNonce | $raw %]">

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2026-03-12 10:50:39 +01:00
parent 90f173ac6a
commit e00059dd1a
No known key found for this signature in database
GPG Key ID: A085E712BEF0E0F0
456 changed files with 807 additions and 806 deletions

View File

@ -50,7 +50,7 @@
[% END %]
[% BLOCK js %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$("#add_bibs_to_list").change(function(){
var selected = $("#add_bibs_to_list").find("option:selected");
if ( selected.attr("class") == "shelf" ){

View File

@ -108,7 +108,7 @@
[% BLOCK js %]
[% INCLUDE 'str/job_progress.inc' job_id=job.id %]
[% INCLUDE 'str/erm_sushi_harvester.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function(){
let job_id = [% job.id | $raw %];
updateProgress(job_id, {

View File

@ -71,7 +71,7 @@
[% BLOCK js %]
[% INCLUDE 'str/job_progress.inc' job_id=job.id %]
[% INCLUDE 'str/import_from_kbart_file.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function(){
let job_id = [% job.id | html %];
updateProgress(job_id, {

View File

@ -3,7 +3,7 @@
[% USE raw %]
<!-- calendar.inc -->
[% FILTER collapse %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var debug = "[% debug | html %]";
var dateformat_pref = "[% Koha.Preference('dateformat') | html %]";
var flatpickr_dateformat_string = "";
@ -42,7 +42,7 @@
[% Asset.js("lib/flatpickr/shortcut-buttons-flatpickr.min.js") | $raw %]
[% Asset.js("lib/maskito/maskito.core.js") | $raw %]
[% Asset.js("lib/maskito/maskito.kit.js") | $raw %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
flatpickr.l10ns.default.weekdays = flatpickr_weekdays;
flatpickr.l10ns.default.months = flatpickr_months;
flatpickr.l10ns.default.rangeSeparator = flatpickr_rangeSeparator;

View File

@ -1,5 +1,5 @@
<!-- catalog-strings.inc -->
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
/* Some required variables from the template */
var biblionumber = "[% biblionumber | html %]";
var count = [% count || 0 | html %];

View File

@ -9,7 +9,7 @@
[% Asset.js("lib/koha/cateditor/marc-mode.js") | $raw %]
[% Asset.js("lib/require.js") | $raw %]
<!-- cateditor-ui.inc -->
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
[% FOREACH shortcut IN shortcuts -%]
var [% shortcut.shortcut_name | html %] = "[% shortcut.shortcut_keys | html %]";
[% END %]
@ -35,11 +35,11 @@
[% IF marcflavour == 'MARC21' %]
[% PROCESS 'cateditor-widgets-marc21.inc' %]
[% ELSE %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var editorWidgets = {};
</script>
[% END %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'preferences', 'resources', 'text-marc', 'widget' ], function( KohaBackend, Search, Macros, MARCEditor, MARC, Preferences, Resources, TextMARC, Widget ) {
var z3950Servers = [
{

View File

@ -76,7 +76,7 @@
</div>
</div>
<!-- cateditor-widgets-marc21.inc -->
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
/**
* Each widget should provide one to three methods:
* init( text ): Returns the DOM node for this widget.

View File

@ -13,7 +13,7 @@
</script>
[%# Prevent XFS attacks -%]
[% UNLESS popup %]
<style id="antiClickjack">
<style nonce="[% Koha.CSPNonce | $raw %]" id="antiClickjack">
body {
display: none !important;
}
@ -33,11 +33,11 @@
[% Asset.css("lib/datatables/datatables.min.css") | $raw %]
[% Asset.css("css/print.css", { media = "print" }) | $raw %]
[% INCLUDE intranetstylesheet.inc %]
<script type="module">
<script nonce="[% Koha.CSPNonce | $raw %]" type="module">
import { APIClient } from "/intranet-tmpl/prog/js/fetch/api-client.js";
window.APIClient = APIClient;
</script>
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var Koha = {};
[% IF CAN_user_parameters_manage_column_config %]
var CAN_user_parameters_manage_column_config = 1;
@ -58,7 +58,7 @@
[% IF ( IntranetUserCSS ) %]
<!-- prettier-ignore-start -->
<style>[% IntranetUserCSS | $raw %]</style>
<style nonce="[% Koha.CSPNonce | $raw %]">[% IntranetUserCSS | $raw %]</style>
<!-- prettier-ignore-end -->
[% END %]

View File

@ -1,6 +1,6 @@
[% USE Koha %]
<!-- format-price.inc -->
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
[%# This should use the Format template plugin, but not pushed yet %]
[% IF Koha.Preference("CurrencyFormat") == 'FR' %]
var default_value = {

View File

@ -93,7 +93,7 @@
[% END %][%# end of block items_table %]
[% BLOCK build_items_table_js %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
let hide_patron_name = [% IF Koha.Preference('HidePatronName') %]true[% ELSE %]false[% END %];
const all_libraries = [% To.json(Branches.all) | $raw %].map(e => {
e["_id"] = e["branchcode"];
@ -163,7 +163,7 @@
otherholdings: "[% PROCESS 'build_table' tab="otherholdings" | collapse | $tojson %]",
};
</script>
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
let items_selection = {};
function _itemSelectionBuildLink(tab_id, link_class) {

View File

@ -1,5 +1,5 @@
<!-- ill-batch-table-strings.inc -->
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var ill_batch_add = _("Add new batch");
var ill_batch_update = _("Update batch");
var ill_batch_none = _("None");

View File

@ -1,5 +1,5 @@
<!-- ill-batch-table-strings.inc -->
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var ill_batch_borrower_details = _("View borrower details");
var ill_batch_edit = _("Edit");
var ill_batch_delete = _("Delete");

View File

@ -1,5 +1,5 @@
<!-- ill-list-table-strings.inc -->
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var ill_borrower_details = _("View patron details");
var ill_manage = _("Manage request");
var ill_manage_select_backend_first = _("Select a backend first");

View File

@ -115,7 +115,7 @@
<input type="hidden" name="op" value="cud-create" />
</form>
[% BLOCK backend_jsinclude %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
// <![CDATA[]
var core = [ [% whole.core | $raw %] ];
[% INCLUDE "ill/backends/Standard/shared/shared.js" %]

View File

@ -83,7 +83,7 @@
<input type="hidden" name="backend" value="Standard" />
</form>
[% BLOCK backend_jsinclude %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var core = [ [% whole.core | $raw %] ];
// <![CDATA[]
[% INCLUDE "ill/backends/Standard/shared/shared.js" %]

View File

@ -108,7 +108,7 @@
<input type="hidden" name="op" value="cud-migrate" />
</form>
[% BLOCK backend_jsinclude %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var core = [ [% whole.core | $raw %] ];
// <![CDATA[]
[% INCLUDE "ill/backends/Standard/shared/shared.js" %]

View File

@ -25,7 +25,7 @@
</button>
</fieldset>
<style>
<style nonce="[% Koha.CSPNonce | $raw %]">
.custom-field-input {
width: 25%;
display: inline-block;

View File

@ -10,7 +10,7 @@
[% ELSE %]
[% Asset.css("css/installer.css") | $raw %]
[% END %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var Koha = {};
</script>
[% IF lang && lang != 'en' %]
@ -19,7 +19,7 @@
[% Asset.js('js/Gettext.js') | $raw %]
[% Asset.js('js/i18n.js') | $raw %]
[% Asset.js('js/stores.js') | $raw %]
<style id="antiClickjack">
<style nonce="[% Koha.CSPNonce | $raw %]" id="antiClickjack">
body {
display: none !important;
}

View File

@ -6,7 +6,7 @@
[% Asset.js("lib/bootstrap/bootstrap.bundle.min.js") | $raw %]
[% Asset.js("lib/jquery/plugins/jquery.validate.min.js") | $raw %]
<!-- installer-intranet-bottom.inc -->
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
function _(s) { return s } // dummy function for gettext
[%# Prevent XFS attacks -%]
$(document).ready(function() {

View File

@ -1,5 +1,5 @@
<!-- installer-strings.inc -->
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var MSG_LETTERS_ONLY = _("Please only enter letters.");
var MSG_PASSWORD_MISMATCH = _("The entered passwords do not match");
var MSG_ONE_ENROLLMENTPERIOD = _("Please choose an enrollment period in months OR by date.");

View File

@ -187,7 +187,7 @@
[% END %]
[% IF Koha.debug_flag %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
(function () {
function getURLParams() {
const params = new URLSearchParams(window.location.search);

View File

@ -1,5 +1,5 @@
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
(function () {
/**
* Format the biblio response from a Koha RESTful API request.

View File

@ -6,13 +6,13 @@
[% Asset.js("lib/dayjs/plugin/utc.js") | $raw %]
[% Asset.js("lib/dayjs/plugin/timezone.js") | $raw %]
[% Asset.js("lib/dayjs/plugin/customParseFormat.js") | $raw %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
dayjs.extend(window.dayjs_plugin_utc);
dayjs.extend(window.dayjs_plugin_timezone);
dayjs.extend(window.dayjs_plugin_customParseFormat);
</script>
<!-- js-date-format.inc -->
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
(function() {
var def_date_format = '[% Koha.Preference('dateformat') | html %]';
var def_time_format = '[% Koha.Preference('TimeFormat') | html %]';

View File

@ -2,7 +2,7 @@
[% USE raw %]
[% USE To %]
[% USE AuthorisedValues %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
(function() {
const roadtypes = [% To.json(AuthorisedValues.Get('ROADTYPE')) | $raw %];

View File

@ -1,6 +1,6 @@
<!-- js-patron-get-age.inc -->
[% USE KohaDates %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
(function() {
const tz = '[% KohaDates.tz | html %]';

View File

@ -6,7 +6,7 @@
[% USE Koha %]
[%# Prevent XFS attacks -%]
[% UNLESS popup %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
if (self === top) {
var antiClickjack = document.getElementById("antiClickjack");
antiClickjack.parentNode.removeChild(antiClickjack);
@ -35,7 +35,7 @@
[% INCLUDE 'validator-strings.inc' %]
[% IF ( IntranetUserJS ) %]
<!-- js_includes.inc: IntranetUserJS -->
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
[% IntranetUserJS | $raw %]
</script>
<!-- / js_includes.inc: IntranetUserJS -->
@ -51,7 +51,7 @@
[% END %]
[% IF Koha.Preference('AudioAlerts') || AudioAlertsPage %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
// AudioAlerts
var AUDIO_ALERT_PATH = '[% interface | html %]/[% theme | html %]/sound/';
var AUDIO_ALERTS = JSON.parse( "[% To.json(AudioAlerts.AudioAlerts) | $raw %]" );
@ -69,7 +69,7 @@
});
</script>
[% END %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var defaultPatronSearchFields = "[% Koha.Preference('DefaultPatronSearchFields') || 'firstname|preferred_name|middle_name|surname|othernames|cardnumber|userid' | html %]";
var defaultPatronSearchMethod = "[% Koha.Preference('DefaultPatronSearchMethod') || 'contains' | html %]";
var extendedPatronAttributes = "[% Koha.Preference('ExtendedPatronAttributes') | html %]";
@ -78,7 +78,7 @@
var showPatronFirstnameIfDifferentThanPreferredname = [% Koha.Preference('ShowPatronFirstnameIfDifferentThanPreferredname') ? 1 : 0 | html %];
</script>
[% IF ( PatronAutoComplete ) %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
// PatronAutoComplete
var loggedInClass = "";
$(document).ready(function(){

View File

@ -1,5 +1,5 @@
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var showLastPatronCount = "[% Koha.Preference('showLastPatronCount') | html %]";
</script>
<div id="lastborrower-window">

View File

@ -83,9 +83,10 @@
[% END %]
</div>
</div>
[% SET islands = Asset.js("js/vue/dist/islands.esm.js").match('(src="([^"]+)")').1 %] <script src="[% islands | $raw %]" type="module">
[% SET islands = Asset.js("js/vue/dist/islands.esm.js").match('(src="([^"]+)")').1 %]
<script src="[% islands | $raw %]" type="module">
</script>
<script type="module">
<script nonce="[% Koha.CSPNonce | $raw %]" type="module">
import { hydrate } from "[% islands | $raw %]";
hydrate();
</script>

View File

@ -337,7 +337,7 @@
[% END %]
</tbody>
</table>
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
document.addEventListener("DOMContentLoaded", function () {
const selectElement = document.querySelector('select[name="2-DAYS"]');

View File

@ -46,7 +46,7 @@
[% END %]
[% BLOCK 'modal-claims-js' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
// Verify if the syspref is defined
var ClaimReturnedLostValue = "[% Koha.Preference('ClaimReturnedLostValue') | html %]";

View File

@ -1,6 +1,6 @@
[% USE Koha %]
<!-- password_check.inc -->
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var pwd_title = "";
var pattern_title = "";
var new_password_node_name = "[% new_password | html %]";

View File

@ -231,11 +231,11 @@
[% BLOCK patron_search_js %]
[% IF redirect_if_one_result && !redirect_url %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
console.log("Wrong call of patron_search_js - missing redirect_url");
</script>
[% END %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var categories = [% To.json(Categories.all.unblessed) | $raw %].map(e => {
e['_id'] = e.categorycode.toLowerCase();
e['_str'] = e.description;
@ -302,7 +302,7 @@
[% INCLUDE 'datatables.inc' %]
[% INCLUDE 'js-patron-get-age.inc' %]
[% INCLUDE 'js-patron-format-address.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
{
function get_patron_search_form(){
@ -1036,7 +1036,7 @@
</div>
</div>
<div id="patron_preview_modal" class="basicModal"></div>
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function() {
let parent_block = $("#[% search_results_block_id | html %]");
parent_block.find(".select_all").on("click",function(e){

View File

@ -1,6 +1,6 @@
[% USE raw %]
<!-- slip-print.inc -->
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
[% IF ( Koha.Preference('IntranetSlipPrinterJS') ) %]
let autoprint = false;
[% Koha.Preference('IntranetSlipPrinterJS') | $raw %]

View File

@ -1,6 +1,6 @@
[% USE raw %]
<!-- str/cataloging_additem.inc -->
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var searchid = '[% searchid | html %]';
var biblionumber = '[% biblionumber | html %]';
var frameworkcode = '[% frameworkcode | html %]';

View File

@ -1,5 +1,5 @@
<!-- str/job_progress.inc -->
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var REQUESTING_SUSHI = _("Requesting SUSHI service");
var CREATING_COUNTER = _("Creating COUNTER file and processing data");
</script>

View File

@ -1,5 +1,5 @@
<!-- str/job_progress.inc -->
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var READING_FILE = _("Reading file");
var PROCESSING_FILE = _("Processing file and importing titles");
</script>

View File

@ -1,5 +1,5 @@
<!-- str/job_progress.inc -->
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var JOB_PROGRESS_NOT_STARTED = _("Not started");
var JOB_PROGRESS_STARTED = _("Started");
var JOB_PROGRESS_FINISHED = _("Finished");

View File

@ -6,7 +6,7 @@
[% IF ( Koha.Preference('patronimages') ) %]
[% Asset.js("js/patron-webcam.js") | $raw %]
[% END %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var advsearch = "[% advsearch | html %]";
var destination = "[% destination | html %]";

View File

@ -1,5 +1,5 @@
<!-- str/tinymce_i18n.inc -->
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
/* tinymce considers 'en' to be the default translation.
Translating this file will allow us to load the correct language
along with the template */

View File

@ -1,5 +1,5 @@
<!-- validator-strings.inc -->
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
jQuery.extend(jQuery.validator.messages, {
required: _("This field is required."),

View File

@ -4,7 +4,7 @@
[% Asset.js("lib/tiny_mce/tinymce.min.js") | $raw %]
[% INCLUDE 'str/tinymce_i18n.inc' %]
<!-- wysiwyg-systempreferences.inc -->
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
// Save TinyMCE content and trigger an event on the original element
function wysiwyg_change (ed){
ed.save();

View File

@ -1,5 +1,5 @@
<!-- z3950_search.inc -->
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var interface = "[% interface | html %]";
var theme = "[% theme | html %]";
var total_pages = new Number("[% total_pages | html %]");

View File

@ -13,7 +13,7 @@
[% END %]</title
>
[% INCLUDE 'doc-head-close.inc' %]
<style>
<style nonce="[% Koha.CSPNonce | $raw %]">
.version-ellipsis {
text-decoration: underline;
}
@ -93,7 +93,7 @@
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'datatables.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
let perl_table = $("#perl_table").kohaTable({
autoWidth: false,

View File

@ -207,10 +207,10 @@
[% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %]
[% Asset.js("js/acquisitions-menu.js") | $raw %]
[% IF loop_budget %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'acq_acqui-home', 'accounts', 'json' ) | $raw %];
</script>
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
dt_overwrite_html_sorting_localeCompare();
$(document).ready(function () {

View File

@ -17,7 +17,7 @@
[% END %]</title
>
[% FILTER collapse %]
<style>
<style nonce="[% Koha.CSPNonce | $raw %]">
.biblio {
padding: 0 0.5em;
margin: 0;
@ -45,7 +45,7 @@
[% INCLUDE 'doc-head-close.inc' %]
[% Asset.css("css/addbiblio.css") | $raw %]
[%# As long as cataloging plugins rely on 'script' tags added inline, JS must be in the header %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
const template_path = "[% interface | html %]/[% theme | html %]";
</script>
[% Asset.js("js/acquisitions-menu.js") | $raw %]

View File

@ -33,7 +33,7 @@
[% END %]</title
>
[% INCLUDE 'doc-head-close.inc' %]
<style>
<style nonce="[% Koha.CSPNonce | $raw %]">
.sortmsg {
font-size: 80%;
}
@ -1274,7 +1274,7 @@
[% INCLUDE 'datatables.inc' %]
[% Asset.js("js/acq.js") | $raw %]
[% INCLUDE 'calendar.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
function updateColumnsVisibility(visible) {
if ( visible ) {
$("table .tax_excluded, .tax_included").show();
@ -1362,7 +1362,7 @@
});
</script>
[% UNLESS ( closedate ) %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
function transfer_order_popup(ordernumber) {
var url = "/cgi-bin/koha/acqui/transferorder.pl?"
+ "ordernumber=" + ordernumber
@ -1391,7 +1391,7 @@
});
</script>
[% ELSE %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function(){
$("#basketgroupid").change(function(){
if($(this).val() == "new"){
@ -1403,7 +1403,7 @@
});
</script>
[% END # /UNLESS (closedate) %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var orders_table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'basket', 'orders', 'json' ) | $raw %];
let supplier_report_column = orders_table_settings.columns.find(c => c.columnname == 'supplier_report');
[% IF !(Koha.Preference('EDIFACT') && ediaccount) %]
@ -1432,7 +1432,7 @@
let skip_confirm_reopen = [% skip_confirm_reopen ? 1 : 0 | html %];
</script>
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
$("#orders").kohaTable(
{

View File

@ -396,11 +396,11 @@
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'datatables.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
let listclosed = [% listclosed ? 1 : 0 | html %];
let grouping = [% grouping ? 1 : 0 | html %];
</script>
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
function submitForm(form) {
if (form.closedbg.checked == true) {
var input = document.createElement("input");

View File

@ -174,7 +174,7 @@
[% Asset.js("js/acq.js") | $raw %]
[% Asset.js("js/additional-fields-entry.js") | $raw %]
[% INCLUDE 'select2.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
function display_vendor(vendor) {
var $text;

View File

@ -14,7 +14,7 @@
[% END %]</title
>
[% INCLUDE 'doc-head-close.inc' %]
<style>
<style nonce="[% Koha.CSPNonce | $raw %]">
#vendors td {
vertical-align: top;
}
@ -232,7 +232,7 @@
[% Asset.js("js/acquisitions-menu.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
[% Asset.js("js/acq.js") | $raw %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
$("table.baskets").kohaTable({
dom: "t",

View File

@ -16,7 +16,7 @@
[% END %]</title
>
[% INCLUDE 'doc-head-close.inc' %]
<style>
<style nonce="[% Koha.CSPNonce | $raw %]">
.picked_to_duplicate > td {
background-color: #bcdb89 !important;
}
@ -314,11 +314,11 @@
[% INCLUDE 'datatables.inc' %]
[% Asset.js("js/acq.js") | $raw %]
[% Asset.js("js/funds_sorts.js") | $raw %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
const op = "[% op | html %]";
const has_results = [% result_order_loop ? 1 : 0 | html %];
</script>
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
function update_ordernumber_list() {
var ordernumbers = [];
$("input[name='ordernumber']")

View File

@ -44,7 +44,7 @@
[% Asset.js("js/acquisitions-menu.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
[% Asset.js("js/modals/edifact-modal.js") | $raw %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
let edi_msgs_table_url = "/api/v1/acquisitions/edifiles?";

View File

@ -167,10 +167,10 @@
[% Asset.js("js/acquisitions-menu.js") | $raw %]
[% INCLUDE 'calendar.inc' %]
[% INCLUDE 'datatables.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'histsearch', 'histsearcht', 'json' ) | $raw %];
</script>
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
$("#histsearcht").kohaTable(
{

View File

@ -115,7 +115,7 @@
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/acquisitions-menu.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
$("#invoice_files_details_table").kohaTable({
columnDefs: [{ targets: [-1, -2], orderable: false, searchable: false }],

View File

@ -576,14 +576,14 @@
[% INCLUDE 'calendar.inc' %]
[% INCLUDE 'datatables.inc' %]
[% Asset.js("js/modals/edifact-modal.js") | $raw %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
addPrefs({
AcqEnableFiles: [% Koha.Preference('AcqEnableFiles') ? 1 : 0 | html %],
});
const invoiceincgst = [% invoiceincgst ? 1 : 0 | html %];
const has_files = [% files ? 1 : 0 | html %];
</script>
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
function updateColumnsVisibility(visible) {
if (visible) {
$("table .tax_excluded, .tax_included").show();

View File

@ -478,7 +478,7 @@
[% INCLUDE 'calendar.inc' %]
[% INCLUDE 'select2.inc' %]
[% INCLUDE 'js-date-format.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
$('[id^="CheckAll"]').click(function () {
var table_id = "#" + $(this).attr("data-cb") + "resultst";

View File

@ -374,10 +374,10 @@
[% Asset.js("js/acquisitions-menu.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
[% INCLUDE 'calendar.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'lateorders', 'late_orders', 'json' ) | $raw %];
</script>
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var late_orderst;
function check_uncheck() {
var all_nodes = late_orderst.DataTable().rows().nodes();

View File

@ -21,7 +21,7 @@
>
[% INCLUDE 'doc-head-close.inc' %]
[% FILTER collapse %]
<style>
<style nonce="[% Koha.CSPNonce | $raw %]">
#itemfieldset label,
#itemfieldset span.label {
flex-basis: 25%;
@ -54,7 +54,7 @@
[% Asset.js("js/additional-fields-entry.js") | $raw %]
[% INCLUDE 'calendar.inc' %]
[% INCLUDE 'select2.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
actTotal = "";
function Check(ff) {

View File

@ -114,7 +114,7 @@
[% Asset.js("js/acquisitions-menu.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
[% INCLUDE 'calendar.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
function updateRowsVisibility(show_only_renewed) {
if (show_only_renewed) {
$("#srlt [data-reneweddate='']").hide();

View File

@ -131,10 +131,10 @@
[% INCLUDE 'datatables.inc' %]
[% INCLUDE 'calendar.inc' %]
[% IF suggestions.size %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
const logged_in_user = [% To.json(logged_in_user.unblessed) | $raw %];
</script>
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
var suggestionst = $("#suggestionst").kohaTable({
columnDefs: [

View File

@ -118,7 +118,7 @@
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/acquisitions-menu.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
$("#spent").kohaTable({
pagingType: "full",

View File

@ -20,7 +20,7 @@
[% END %]</title
>
[% INCLUDE 'doc-head-close.inc' %]
<style>
<style nonce="[% Koha.CSPNonce | $raw %]">
@media (min-width: 1200px) {
#receive-modal,
#receive-modal {
@ -453,7 +453,7 @@
[% INCLUDE 'datatables.inc' %]
[% INCLUDE 'js-date-format.inc' %]
[% INCLUDE 'format_price.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var edit_mode = "[% edit | html %]";
var invoiceincgst = "[% invoiceincgst | html %]";
var active_currency = "[% active_currency.currency | html %]";
@ -468,7 +468,7 @@
CAN_user_acquisition: [% CAN_user_acquisition ? 1 : 0 | html %],
});
</script>
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
function display_string(key, strings, fallback) {
if (strings.hasOwnProperty(key)) {
return (strings[key].str && escape_str(strings[key].str)) || "";

View File

@ -350,12 +350,12 @@
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/acquisitions-menu.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
<style>
<style nonce="[% Koha.CSPNonce | $raw %]">
fieldset.action {
margin-bottom: 20px;
}
</style>
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
addPrefs({
marcflavour: "[% Koha.Preference('marcflavour') | html %]",
});
@ -374,7 +374,7 @@
order: "[%tp("noun", "Order") | html %]",
};
</script>
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
dt_overwrite_html_sorting_localeCompare();
var PENDING_MULTI_SELECTION = _("Receive selected (%s)");
var columns_filter = {};

View File

@ -269,7 +269,7 @@
[% Asset.js("js/additional-fields-entry.js") | $raw %]
[% INCLUDE 'calendar.inc' %]
[% INCLUDE 'datatables.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
$("#parcelst").kohaTable({
paging: false,

View File

@ -128,7 +128,7 @@
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/acquisitions-menu.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
$("#spent").kohaTable({
pagingType: "full",

View File

@ -170,14 +170,14 @@
[% MACRO jsinclude BLOCK %]
[% IF transferred %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
opener.location.reload();
window.close();
</script>
[% END %]
[% IF ( bookselleridfrom ) %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
$(".confirm_transfer").on("click", function () {
return confirm(_("Transfer order to this basket?"));

View File

@ -189,7 +189,7 @@
[% Asset.js("js/acquisitions-menu.js") | $raw %]
[% Asset.js("js/acq.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
var uncertainpricet = $("#uncertainpricet").kohaTable({
pagingType: "full",

View File

@ -210,10 +210,10 @@
[% Asset.js("js/acquisitions-menu.js") | $raw %]
[% INCLUDE 'calendar.inc' %]
[% INCLUDE 'datatables.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
const vendor_id = [% vendor.id | html %];
</script>
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
var issues_table_url = `/api/v1/acquisitions/vendors/${vendor_id}/issues?`;

View File

@ -28,7 +28,7 @@
[% INCLUDE 'datatables.inc' %]
[% INCLUDE 'js-date-format.inc' %]
[% INCLUDE 'format_price.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
const vendorTableSettings = [% TablesSettings.GetTableSettings( 'acqui', 'vendors', 'vendors', 'json' ) | $raw %];
</script>
[% Asset.js("js/vue/dist/acquisitions.js") | $raw %]

View File

@ -20,7 +20,7 @@
[% INCLUDE 'doc-head-close.inc' %]
[% USE Koha %]
<style>
<style nonce="[% Koha.CSPNonce | $raw %]">
tr.selected {
background-color: #ffffcc;
}
@ -332,7 +332,7 @@
[% INCLUDE 'datatables.inc' %]
[% INCLUDE 'z3950_search.inc' %]
[% Asset.js("js/z3950_search.js") | $raw %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
var resultst = $("#resultst").kohaTable({
columnDefs: [{ targets: [1], type: "nsb-nse" }],

View File

@ -315,7 +315,7 @@
[% MACRO jsinclude BLOCK %]
[% INCLUDE "datatables.inc" %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
$("#selecttable").find(":submit").hide();
$("#selecttable select").change(function () {

View File

@ -563,10 +563,10 @@
[% Asset.js("js/acq.js") | $raw %]
[% IF close_form %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
const budget_period_description = "[% budget_period_description | html %]";
</script>
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
$("#budgeth").kohaTable({
dom: "t",
@ -583,7 +583,7 @@
[% END %]
[% IF closed %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
var oTable = $("#closed_report").kohaTable({
// The following is a c/p from aqbudgets.tt and is a candidate for refactoring.
@ -622,7 +622,7 @@
});
</script>
[% END %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
let dt_params = {
pagingType: "full",

View File

@ -528,7 +528,7 @@
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/acq.js") | $raw %]
[% IF op == 'add_form' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
//<![CDATA[
function select_user(borrowernumber, borrower) {
@ -677,10 +677,10 @@
[% INCLUDE 'datatables.inc' %]
[% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %]
[% IF budgets %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
const budget_period_id = [% budget_period_id || 'null' | html %];
</script>
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
var oTable = $("#budgeth").kohaTable({
drawCallback: function (oSettings) {
@ -749,7 +749,7 @@
});
</script>
[% END %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
$(".deletefund-disabled").on("click", function (e) {
e.preventDefault();

View File

@ -202,7 +202,7 @@
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'calendar.inc' %]
[% Asset.js("js/acq.js") | $raw %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
$("#add_modify_contract").validate({
rules: {

View File

@ -13,7 +13,7 @@
[% END %]</title
>
[% INCLUDE 'doc-head-close.inc' %]
<style>
<style nonce="[% Koha.CSPNonce | $raw %]">
td.locked {
background-image: url("[% interface | html %]/[% theme | html %]/img/locked.png");
padding-left: 20px;
@ -320,7 +320,7 @@
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/acq.js") | $raw %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
jQuery.validator.addClassRules({ plan_entry: { pnumber: true } }); // require that input be a number in fields with the class 'plan_entry'
jQuery.validator.addMethod("pnumber", $.validator.methods.number, _("Please enter a valid number.") );
var zero_formatted = "[% 0 | $Price on_editing => 1 %]";

View File

@ -435,10 +435,10 @@
[% INCLUDE 'datatables.inc' %]
[% Asset.js( "lib/sortable/Sortable.min.js" ) | $raw %]
[% Asset.js("js/admin-menu.js") | $raw %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
const tagsubfield = [% IF tagsubfield %]"[% tagsubfield | html %]"[% ELSE %]null[% END %];
</script>
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
$("#table_authsubfieldstructure").kohaTable({
order: [],

View File

@ -287,7 +287,7 @@
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'datatables.inc' %]
[% Asset.js("js/admin-menu.js") | $raw %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
$("#table_authtagstructure").kohaTable({
pagingType: "full",

View File

@ -35,7 +35,7 @@
[% INCLUDE 'doc-head-close.inc' %]
[% FILTER collapse %]
<style>
<style nonce="[% Koha.CSPNonce | $raw %]">
fieldset.rows div.toptabs li {
clear: none;
margin-right: 0.4em;
@ -403,7 +403,7 @@
[% Asset.js("js/admin-menu.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
[% INCLUDE 'select2.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
$("#categoriest").kohaTable({
order: [[0, "asc"]],

View File

@ -144,7 +144,7 @@
[% Asset.js("js/admin-menu.js") | $raw %]
[% INCLUDE 'js-date-format.inc' %]
[% INCLUDE 'datatables.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
const job_statuses = [
{'_id': 'new', '_str': _("New")},
{'_id': 'cancelled', '_str': _("Cancelled")},
@ -244,7 +244,7 @@
type: "[% job.type | html %]",
};
</script>
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
function get_job_type(job_type) {
let job_type_lib = job_types.find(t => t._id == job_type);
if (job_type_lib) {

View File

@ -452,7 +452,7 @@
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'datatables.inc' %]
[% Asset.js("js/admin-menu.js") | $raw %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var template_path = "[% interface | html %]/[% theme | html %]";
</script>
[% Asset.js("js/biblio_framework.js") | $raw %]

View File

@ -13,7 +13,7 @@
[% END %]</title
>
[% INCLUDE 'doc-head-close.inc' %]
<style>
<style nonce="[% Koha.CSPNonce | $raw %]">
td {
text-align: center;
}
@ -137,10 +137,10 @@
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/admin-menu.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
const codes_loop = [% To.json(codes_loop) | $raw %];
</script>
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
$("#CheckAll").on("click", function (e) {
e.preventDefault();

View File

@ -30,7 +30,7 @@
[% Asset.css("lib/codemirror/codemirror.min.css") | $raw %]
[% Asset.css("lib/codemirror/lint.min.css") | $raw %]
[% FILTER collapse %]
<style>
<style nonce="[% Koha.CSPNonce | $raw %]">
.opac-library-info {
border: 1px solid #dedede;
border-radius: 2px;
@ -809,7 +809,7 @@
[% Asset.js( "lib/codemirror/css-lint.min.js" ) | $raw %]
[% Asset.js( "lib/codemirror/yaml-lint.min.js" ) | $raw %]
[% Asset.css("lib/codemirror/codemirror.css") | $raw %]
<style>
<style nonce="[% Koha.CSPNonce | $raw %]">
.CodeMirror {
border: 1px solid #eee;
margin: 1em, 1em, 1em, 0;
@ -817,11 +817,11 @@
width: 50em;
}
</style>
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var table_settings = [% TablesSettings.GetTableSettings( 'admin', 'libraries', 'libraries', 'json' ) | $raw %];
var calendarFirstDayOfWeek = '[% Koha.Preference('CalendarFirstDayOfWeek') | html %]';
</script>
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var libraries_table;
$(document).ready(function () {
var libraries_url = "/api/v1/libraries";
@ -1034,7 +1034,7 @@
});
</script>
[% UNLESS library %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$("#Aform").on("submit", function (event) {
if ($("#branchcode").val().match(/\s/)) {
event.preventDefault();

View File

@ -234,7 +234,7 @@
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/admin-menu.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
var crtable = $("#table_cash_registers").kohaTable({
order: [[1, "asc"]],

View File

@ -33,7 +33,7 @@
>
[% INCLUDE 'doc-head-close.inc' %]
[% Asset.css("lib/jquery/plugins/multiple-select/multiple-select.min.css") | $raw %]
<style>
<style nonce="[% Koha.CSPNonce | $raw %]">
#enrolmentmessage.hint {
display: none;
}
@ -851,7 +851,7 @@
[% END %]
[% MACRO jsinclude BLOCK %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var TalkingTechItivaPhoneNotification = [% Koha.Preference('TalkingTechItivaPhoneNotification') || 0 | html %];
var PhoneNotification = [% Koha.Preference('PhoneNotification') || 0 | html %];
</script>
@ -861,7 +861,7 @@
[% INCLUDE 'calendar.inc' %]
[% INCLUDE 'datatables.inc' %]
[% INCLUDE 'select2.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var table_settings = [% TablesSettings.GetTableSettings( 'admin', 'categories', 'patron_categories', 'json' ) | $raw %];
</script>
[% Asset.js("js/categories.js") | $raw %]

View File

@ -204,7 +204,7 @@
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/admin-menu.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var table_settings = [% TablesSettings.GetTableSettings( 'admin', 'cities', 'table_cities', 'json' ) | $raw %];
var cities_table_url = '/api/v1/cities?';
@ -217,7 +217,7 @@
cities_table_url += 'q='+ encodeURIComponent(JSON.stringify(city_name_filter));
[% END %]
</script>
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
var cities_table = $("#table_cities").kohaTable(
{

View File

@ -33,7 +33,7 @@
[% END %]</title
>
[% INCLUDE 'doc-head-close.inc' %]
<style>
<style nonce="[% Koha.CSPNonce | $raw %]">
#button_add,
.split_regex,
.split_callnumber {
@ -437,7 +437,7 @@
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/admin-menu.js") | $raw %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
function update_regex_block() {
if ($("#split_routine option:selected").val() == "RegEx") {
$("#regex_block").show();

View File

@ -201,7 +201,7 @@
[% END %]</title
>
[% INCLUDE 'doc-head-close.inc' %]
<style>
<style nonce="[% Koha.CSPNonce | $raw %]">
caption {
font-size: 115%;
}
@ -403,7 +403,7 @@
[% Asset.js("js/admin-menu.js") | $raw %]
[%- IF ( panel.defined ) -%]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready( function() {
$("#[% panel | uri %]_panel").collapse("show");
[%- IF page.defined -%]

View File

@ -254,7 +254,7 @@
[% Asset.js("js/additional-fields-entry.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
[% INCLUDE 'select2.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
var txtActivefilter = _("Filter system credit types");
var txtInactivefilter = _("Show all credit types");

View File

@ -13,7 +13,7 @@
[% END %]</title
>
[% INCLUDE 'doc-head-close.inc' %]
<style>
<style nonce="[% Koha.CSPNonce | $raw %]">
.pickup-slot {
border: 2px solid #b9d8d9;
padding: 0 0.1em;
@ -173,7 +173,7 @@
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/admin-menu.js") | $raw %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
let opening_slots = {};
let slots;
[% FOR l IN libraries %]

View File

@ -266,10 +266,10 @@
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/admin-menu.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
let table_settings = [% TablesSettings.GetTableSettings( 'admin', 'currency', 'currencies-table', 'json' ) | $raw %]
</script>
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
function check_currency(val) {
if (val == 1.0) {
$("#active").prop("disabled", false);

View File

@ -271,7 +271,7 @@
[% Asset.js("js/additional-fields-entry.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
[% INCLUDE 'select2.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
var txtActivefilter = _("Filter system debit types");
var txtInactivefilter = _("Show all debit types");

View File

@ -206,7 +206,7 @@
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/admin-menu.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
$("#table_desks").kohaTable({
order: [[1, "asc"]],

View File

@ -79,7 +79,7 @@
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/admin-menu.js") | $raw %]
[% Asset.js( "lib/sortable/Sortable.min.js" ) | $raw %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
$(".pluginlist").each((i, e) => {
Sortable.create(e, {

View File

@ -409,10 +409,10 @@
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/admin-menu.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var table_settings = [% TablesSettings.GetTableSettings( 'admin', 'edi_accounts', 'edi_accounts_table', 'json' ) | $raw %];
</script>
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
$("#edi_accounts_table").kohaTable(
{

View File

@ -459,13 +459,13 @@
[% Asset.js("js/admin-menu.js") | $raw %]
[% Asset.js("js/transport_status.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
const i18n = {
on: "[% tp("Active", "On") | html %]",
passive: "[% tp('FTP connection mode', '(passive)') | html %]",
};
</script>
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
var file_transports_url = "/api/v1/config/file_transports";
window.file_transports = $("#file_transports").kohaTable({

View File

@ -13,7 +13,7 @@
[% END %]</title
>
[% INCLUDE 'doc-head-close.inc' %]
<style>
<style nonce="[% Koha.CSPNonce | $raw %]">
.disabled-transfer {
background-color: #ff8888;
}
@ -108,7 +108,7 @@
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/admin-menu.js") | $raw %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
jQuery.validator.addClassRules("float_limit", {
digits: true,

View File

@ -327,7 +327,7 @@
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/admin-menu.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var identity_provider_domains_url = '/api/v1/auth/identity_providers/[%- identity_provider_id | html -%]/domains';
[% SET categories = Categories.all() %]
var categories = {
@ -344,7 +344,7 @@
const identity_provider_id = "[%- identity_provider_id | html -%]";
</script>
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
window.identity_provider_domains = $("#identity_provider_domains").kohaTable({
ajax: {

View File

@ -406,7 +406,7 @@
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/admin-menu.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
var identity_providers_url = "/api/v1/auth/identity_providers";
window.identity_providers = $("#identity_providers").kohaTable({

View File

@ -13,7 +13,7 @@
>
[% INCLUDE 'doc-head-close.inc' %]
[% FILTER collapse %]
<style>
<style nonce="[% Koha.CSPNonce | $raw %]">
table.grid thead th {
vertical-align: bottom;
}
@ -173,7 +173,7 @@
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/admin-menu.js") | $raw %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var $branch = "[% branch | html %]";
$(function(){

View File

@ -36,7 +36,7 @@
>
[% INCLUDE 'doc-head-close.inc' %]
[% FILTER collapse %]
<style>
<style nonce="[% Koha.CSPNonce | $raw %]">
fieldset.rows div.toptabs li {
clear: none;
margin-right: 0.4em;
@ -548,13 +548,13 @@
[% Asset.js("js/admin-menu.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
[% INCLUDE 'select2.inc' %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
var table_settings = [% TablesSettings.GetTableSettings( 'admin', 'itemtypes', 'table_item_type', 'json' ) | $raw %];
[% IF ( Koha.Preference('noItemTypeImages') && Koha.Preference('OpacNoItemTypeImages') ) %]
table_settings['columns'].shift(); // Remove item type image column from configuration
[% END %]
</script>
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
$(document).ready(function () {
$("#table_item_type").kohaTable(
{

View File

@ -81,7 +81,7 @@
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'datatables.inc' %]
[% Asset.js("js/admin-menu.js") | $raw %]
<script>
<script nonce="[% Koha.CSPNonce | $raw %]">
function AddFld(kohafield) {
var fieldstr = prompt(
_("Adding a mapping for: %s.").format(kohafield) +

Some files were not shown because too many files have changed in this diff Show More