|
Lines 356-361
$( document ).ready( function () {
Link Here
|
| 356 |
' <label for="matchPattern_' + id + '">' + __('String used to identify cookie name') + ':</label>' + |
356 |
' <label for="matchPattern_' + id + '">' + __('String used to identify cookie name') + ':</label>' + |
| 357 |
' <input id="matchPattern_' + id + '" class="metaMatchPattern" type="text" value="' + item.matchPattern + '"><span class="required">' + __('Required') + '</span>' + |
357 |
' <input id="matchPattern_' + id + '" class="metaMatchPattern" type="text" value="' + item.matchPattern + '"><span class="required">' + __('Required') + '</span>' + |
| 358 |
' </div >' + |
358 |
' </div >' + |
|
|
359 |
' <div class="consentItem">' + |
| 360 |
' <label for="cookieDomain' + id + '">' + __('Cookie domain') + ':</label>' + |
| 361 |
' <input id="cookieDomain' + id + '" class="metaCookieDomain" type="text" value="' + item.cookieDomain + '"><span class="required">' + __('Required') + '</span>' + |
| 362 |
' </div >' + |
| 363 |
' <div class="consentItem">' + |
| 364 |
' <label for="cookiePath' + id + '">' + __('Cookie path') + ':</label>' + |
| 365 |
' <input id="cookiePath' + id + '" class="metaCookiePath" type="text" value="' + item.cookiePath + '"><span class="required">' + __('Required') + '</span>' + |
| 366 |
' </div >' + |
| 359 |
' </div >' + |
367 |
' </div >' + |
| 360 |
' <div class="consentRow codeRow">' + |
368 |
' <div class="consentRow codeRow">' + |
| 361 |
' <textarea style="display:none;" id="pref_' + id + '" class="preference preference-code codemirror" rows="10" cols="40">' + code + '</textarea>' + |
369 |
' <textarea style="display:none;" id="pref_' + id + '" class="preference preference-code codemirror" rows="10" cols="40">' + code + '</textarea>' + |
|
Lines 386-391
$( document ).ready( function () {
Link Here
|
| 386 |
name: '', |
394 |
name: '', |
| 387 |
description: '', |
395 |
description: '', |
| 388 |
matchPattern: '', |
396 |
matchPattern: '', |
|
|
397 |
cookieDomain: '', |
| 398 |
cookiePath: '', |
| 389 |
code: '', |
399 |
code: '', |
| 390 |
consentInOpac: false, |
400 |
consentInOpac: false, |
| 391 |
consentInStaff: false |
401 |
consentInStaff: false |
|
Lines 464-469
$( document ).ready( function () {
Link Here
|
| 464 |
const name = $(this).find('.metaName').val(); |
474 |
const name = $(this).find('.metaName').val(); |
| 465 |
const desc = $(this).find('.metaDescription').val(); |
475 |
const desc = $(this).find('.metaDescription').val(); |
| 466 |
const matchPattern = $(this).find('.metaMatchPattern').val(); |
476 |
const matchPattern = $(this).find('.metaMatchPattern').val(); |
|
|
477 |
const cookieDomain = $(this).find('.metaCookieDomain').val(); |
| 478 |
const cookiePath = $(this).find('.metaCookiePath').val(); |
| 467 |
const opacConsent = $(this).find('.opacConsent').is(':checked') |
479 |
const opacConsent = $(this).find('.opacConsent').is(':checked') |
| 468 |
const staffConsent = $(this).find('.staffConsent').is(':checked'); |
480 |
const staffConsent = $(this).find('.staffConsent').is(':checked'); |
| 469 |
const code = $(this).find('.preference-code').val(); |
481 |
const code = $(this).find('.preference-code').val(); |
|
Lines 473-478
$( document ).ready( function () {
Link Here
|
| 473 |
name.length === 0 && |
485 |
name.length === 0 && |
| 474 |
desc.length === 0 && |
486 |
desc.length === 0 && |
| 475 |
matchPattern.length === 0 && |
487 |
matchPattern.length === 0 && |
|
|
488 |
cookieDomain.length === 0 && |
| 489 |
cookiePath.length === 0 && |
| 476 |
code.length === 0 |
490 |
code.length === 0 |
| 477 |
) { |
491 |
) { |
| 478 |
return; |
492 |
return; |
|
Lines 482-487
$( document ).ready( function () {
Link Here
|
| 482 |
(name.length === 0) || |
496 |
(name.length === 0) || |
| 483 |
(desc.length === 0) || |
497 |
(desc.length === 0) || |
| 484 |
(matchPattern.length === 0) || |
498 |
(matchPattern.length === 0) || |
|
|
499 |
(cookiePath.length === 0) || |
| 485 |
(code.length === 0) |
500 |
(code.length === 0) |
| 486 |
) { |
501 |
) { |
| 487 |
invalid.push(this); |
502 |
invalid.push(this); |
|
Lines 491-496
$( document ).ready( function () {
Link Here
|
| 491 |
name: name, |
506 |
name: name, |
| 492 |
description: desc, |
507 |
description: desc, |
| 493 |
matchPattern: matchPattern, |
508 |
matchPattern: matchPattern, |
|
|
509 |
cookieDomain: cookieDomain, |
| 510 |
cookiePath: cookiePath, |
| 494 |
opacConsent: opacConsent, |
511 |
opacConsent: opacConsent, |
| 495 |
staffConsent: staffConsent, |
512 |
staffConsent: staffConsent, |
| 496 |
code: btoa(code) |
513 |
code: btoa(code) |