|
Lines 362-367
$( document ).ready( function () {
Link Here
|
| 362 |
' <label for="matchPattern_' + id + '">' + __('String used to identify cookie name') + ':</label>' + |
362 |
' <label for="matchPattern_' + id + '">' + __('String used to identify cookie name') + ':</label>' + |
| 363 |
' <input id="matchPattern_' + id + '" class="metaMatchPattern" type="text" value="' + item.matchPattern + '"><span class="required">' + __('Required') + '</span>' + |
363 |
' <input id="matchPattern_' + id + '" class="metaMatchPattern" type="text" value="' + item.matchPattern + '"><span class="required">' + __('Required') + '</span>' + |
| 364 |
' </div >' + |
364 |
' </div >' + |
|
|
365 |
' <div class="consentItem">' + |
| 366 |
' <label for="cookieDomain' + id + '">' + __('Cookie domain') + ':</label>' + |
| 367 |
' <input id="cookieDomain' + id + '" class="metaCookieDomain" type="text" value="' + item.cookieDomain + '"><span class="required">' + __('Required') + '</span>' + |
| 368 |
' </div >' + |
| 369 |
' <div class="consentItem">' + |
| 370 |
' <label for="cookiePath' + id + '">' + __('Cookie path') + ':</label>' + |
| 371 |
' <input id="cookiePath' + id + '" class="metaCookiePath" type="text" value="' + item.cookiePath + '"><span class="required">' + __('Required') + '</span>' + |
| 372 |
' </div >' + |
| 365 |
' </div >' + |
373 |
' </div >' + |
| 366 |
' <div class="consentRow codeRow">' + |
374 |
' <div class="consentRow codeRow">' + |
| 367 |
' <textarea style="display:none;" id="pref_' + id + '" class="preference preference-code codemirror" rows="10" cols="40">' + code + '</textarea>' + |
375 |
' <textarea style="display:none;" id="pref_' + id + '" class="preference preference-code codemirror" rows="10" cols="40">' + code + '</textarea>' + |
|
Lines 392-397
$( document ).ready( function () {
Link Here
|
| 392 |
name: '', |
400 |
name: '', |
| 393 |
description: '', |
401 |
description: '', |
| 394 |
matchPattern: '', |
402 |
matchPattern: '', |
|
|
403 |
cookieDomain: '', |
| 404 |
cookiePath: '', |
| 395 |
code: '', |
405 |
code: '', |
| 396 |
consentInOpac: false, |
406 |
consentInOpac: false, |
| 397 |
consentInStaff: false |
407 |
consentInStaff: false |
|
Lines 470-475
$( document ).ready( function () {
Link Here
|
| 470 |
const name = $(this).find('.metaName').val(); |
480 |
const name = $(this).find('.metaName').val(); |
| 471 |
const desc = $(this).find('.metaDescription').val(); |
481 |
const desc = $(this).find('.metaDescription').val(); |
| 472 |
const matchPattern = $(this).find('.metaMatchPattern').val(); |
482 |
const matchPattern = $(this).find('.metaMatchPattern').val(); |
|
|
483 |
const cookieDomain = $(this).find('.metaCookieDomain').val(); |
| 484 |
const cookiePath = $(this).find('.metaCookiePath').val(); |
| 473 |
const opacConsent = $(this).find('.opacConsent').is(':checked') |
485 |
const opacConsent = $(this).find('.opacConsent').is(':checked') |
| 474 |
const staffConsent = $(this).find('.staffConsent').is(':checked'); |
486 |
const staffConsent = $(this).find('.staffConsent').is(':checked'); |
| 475 |
const code = $(this).find('.preference-code').val(); |
487 |
const code = $(this).find('.preference-code').val(); |
|
Lines 479-484
$( document ).ready( function () {
Link Here
|
| 479 |
name.length === 0 && |
491 |
name.length === 0 && |
| 480 |
desc.length === 0 && |
492 |
desc.length === 0 && |
| 481 |
matchPattern.length === 0 && |
493 |
matchPattern.length === 0 && |
|
|
494 |
cookieDomain.length === 0 && |
| 495 |
cookiePath.length === 0 && |
| 482 |
code.length === 0 |
496 |
code.length === 0 |
| 483 |
) { |
497 |
) { |
| 484 |
return; |
498 |
return; |
|
Lines 488-493
$( document ).ready( function () {
Link Here
|
| 488 |
(name.length === 0) || |
502 |
(name.length === 0) || |
| 489 |
(desc.length === 0) || |
503 |
(desc.length === 0) || |
| 490 |
(matchPattern.length === 0) || |
504 |
(matchPattern.length === 0) || |
|
|
505 |
(cookiePath.length === 0) || |
| 491 |
(code.length === 0) |
506 |
(code.length === 0) |
| 492 |
) { |
507 |
) { |
| 493 |
invalid.push(this); |
508 |
invalid.push(this); |
|
Lines 497-502
$( document ).ready( function () {
Link Here
|
| 497 |
name: name, |
512 |
name: name, |
| 498 |
description: desc, |
513 |
description: desc, |
| 499 |
matchPattern: matchPattern, |
514 |
matchPattern: matchPattern, |
|
|
515 |
cookieDomain: cookieDomain, |
| 516 |
cookiePath: cookiePath, |
| 500 |
opacConsent: opacConsent, |
517 |
opacConsent: opacConsent, |
| 501 |
staffConsent: staffConsent, |
518 |
staffConsent: staffConsent, |
| 502 |
code: btoa(code) |
519 |
code: btoa(code) |