Bugzilla – Attachment 90055 Details for
Bug 22973
Remove type attribute from script tags: Staff client includes 2/2
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22973: Remove type attribute from script tags: Staff client includes 2/2
Bug-22973-Remove-type-attribute-from-script-tags-S.patch (text/plain), 9.16 KB, created by
Hayley Pelham
on 2019-05-23 22:47:18 UTC
(
hide
)
Description:
Bug 22973: Remove type attribute from script tags: Staff client includes 2/2
Filename:
MIME Type:
Creator:
Hayley Pelham
Created:
2019-05-23 22:47:18 UTC
Size:
9.16 KB
patch
obsolete
>From 2d10fd10c31050d0038a7316223ac7ef27c45b4b Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 23 May 2019 12:37:45 +0000 >Subject: [PATCH] Bug 22973: Remove type attribute from script tags: Staff > client includes 2/2 > >This patch removes the "type" attribute from <script> tags in several >staff client include files. Also removed: Obsolete "//<![CDATA[ //]]>" >markers. > >This patch also makes minor indentation changes, so diff using the "-w" >flag. > >To test, apply the patch and confirm that examples of affected pages >work properly without any JavaScript errors in the browser console: > > - Installer -> Onboarding (uses installer-strings.inc, > validator-strings.inc) > - Patrons -> Patron details -> Change password (uses > password_check.inc) > - Patrons -> Patron details -> Print summary (slip-print.inc) > - Circulation -> Check out (strings.inc, timepicker.inc) > - Cataloging -> New from Z39.50/SRU (z3950_search.inc) > >Validating the HTML source of any of these pages should return no errors >related to the "type" attribute. > >Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> >--- > .../prog/en/includes/installer-strings.inc | 2 +- > .../prog/en/includes/password_check.inc | 2 +- > .../intranet-tmpl/prog/en/includes/slip-print.inc | 2 +- > .../intranet-tmpl/prog/en/includes/strings.inc | 4 +- > .../intranet-tmpl/prog/en/includes/timepicker.inc | 46 ++++++++++------------ > .../prog/en/includes/validator-strings.inc | 42 ++++++++++---------- > .../prog/en/includes/z3950_search.inc | 4 +- > 7 files changed, 46 insertions(+), 56 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/installer-strings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/installer-strings.inc >index 18da6770551..2ee1129e020 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/installer-strings.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/installer-strings.inc >@@ -1,4 +1,4 @@ >-<script type="text/javascript"> >+<script> > 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.")); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/password_check.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/password_check.inc >index 3493921b9c7..5a037fa6eb9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/password_check.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/password_check.inc >@@ -1,6 +1,6 @@ > [% USE Koha %] > [% BLOCK add_password_check %] >-<script type="text/javascript"> >+<script> > var pwd_title = ""; > var pattern_title = ""; > var new_password_node_name = "[% new_password | html %]"; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/slip-print.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/slip-print.inc >index be7908e4bd8..63f4bc28976 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/slip-print.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/slip-print.inc >@@ -1,5 +1,5 @@ > [% USE raw %] >-<script type="text/javascript"> >+<script> > [% IF ( Koha.Preference('IntranetSlipPrinterJS') ) %] > [% Koha.Preference('IntranetSlipPrinterJS') | $raw %] > [% ELSE %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc >index cb90180f64c..eb7bfda1394 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc >@@ -1,5 +1,4 @@ >-<script type="text/javascript"> >-//<![CDATA[ >+<script> > var CIRCULATION_RETURNED = _("Checked in"); > var CIRCULATION_NOT_RETURNED = _("Unable to check in"); > var NOT_RENEWABLE_OVERDUE = _("Not allowed: overdue"); >@@ -47,5 +46,4 @@ > var CURRENT = _(" (current) "); > var MSG_NO_ITEMTYPE = _("No itemtype"); > var MSG_CHECKOUTS_BY_ITEMTYPE = _("Number of checkouts by item type"); >-//]]> > </script> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/timepicker.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/timepicker.inc >index 2f742d4c96c..04f5d3dbc88 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/timepicker.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/timepicker.inc >@@ -1,26 +1,22 @@ >-<script type="text/javascript"> >- //<![CDATA[ >- >- /* Localization of the timepicker plugin */ >- jQuery(function($){ >- $.timepicker.regional[''] = { >- currentText: _("Now"), >- closeText: _("Done"), >- amNames: [_("AM"), _("A")], >- pmNames: [_("PM"), _("P")], >- timeSuffix: "", >- timeOnlyTitle: _("Choose time"), >- timeText: _("Time"), >- hourText: _("Hour"), >- minuteText: _("Minute"), >- secondText: _("Second"), >- millisecText: _("Millisecond"), >- microsecText: _("Microsecond"), >- timezoneText: _("Time zone"), >- [% IF ( bidi ) %] isRTL: true [% ELSE %] isRTL: false [% END %] >- }; >- $.timepicker.setDefaults($.timepicker.regional['']); >- }); >- >- //]]> >+<script> >+ /* Localization of the timepicker plugin */ >+ jQuery(function($){ >+ $.timepicker.regional[''] = { >+ currentText: _("Now"), >+ closeText: _("Done"), >+ amNames: [_("AM"), _("A")], >+ pmNames: [_("PM"), _("P")], >+ timeSuffix: "", >+ timeOnlyTitle: _("Choose time"), >+ timeText: _("Time"), >+ hourText: _("Hour"), >+ minuteText: _("Minute"), >+ secondText: _("Second"), >+ millisecText: _("Millisecond"), >+ microsecText: _("Microsecond"), >+ timezoneText: _("Time zone"), >+ [% IF ( bidi ) %] isRTL: true [% ELSE %] isRTL: false [% END %] >+ }; >+ $.timepicker.setDefaults($.timepicker.regional['']); >+ }); > </script> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/validator-strings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/validator-strings.inc >index 6368e7b32e6..4b201542d0d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/validator-strings.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/validator-strings.inc >@@ -1,24 +1,22 @@ >-<script type="text/javascript"> >-//<![CDATA[ >-$(document).ready(function(){ >- jQuery.extend(jQuery.validator.messages, { >- required: _("This field is required."), >- remote: _("Please fix this field."), >- email: _("Please enter a valid email address."), >- url: _("Please enter a valid URL."), >- date: _("Please enter a valid date."), >- dateISO: _("Please enter a valid date (ISO)."), >- number: _("Please enter a valid number."), >- digits: _("Please enter only digits."), >- equalTo: _("Please enter the same value again."), >- maxlength: $.validator.format(_("Please enter no more than {0} characters.")), >- minlength: $.validator.format(_("Please enter at least {0} characters.")), >- rangelength: $.validator.format(_("Please enter a value between {0} and {1} characters long.")), >- range: $.validator.format(_("Please enter a value between {0} and {1}.")), >- max: $.validator.format(_("Please enter a value less than or equal to {0}.")), >- min: $.validator.format(_("Please enter a value greater than or equal to {0}.")), >- phone: $.validator.format(_("Please enter a valid phone number.")) >+<script> >+ $(document).ready(function(){ >+ jQuery.extend(jQuery.validator.messages, { >+ required: _("This field is required."), >+ remote: _("Please fix this field."), >+ email: _("Please enter a valid email address."), >+ url: _("Please enter a valid URL."), >+ date: _("Please enter a valid date."), >+ dateISO: _("Please enter a valid date (ISO)."), >+ number: _("Please enter a valid number."), >+ digits: _("Please enter only digits."), >+ equalTo: _("Please enter the same value again."), >+ maxlength: $.validator.format(_("Please enter no more than {0} characters.")), >+ minlength: $.validator.format(_("Please enter at least {0} characters.")), >+ rangelength: $.validator.format(_("Please enter a value between {0} and {1} characters long.")), >+ range: $.validator.format(_("Please enter a value between {0} and {1}.")), >+ max: $.validator.format(_("Please enter a value less than or equal to {0}.")), >+ min: $.validator.format(_("Please enter a value greater than or equal to {0}.")), >+ phone: $.validator.format(_("Please enter a valid phone number.")) >+ }); > }); >-}); >-//]]> > </script> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/z3950_search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/z3950_search.inc >index 703b7603066..a59dfacd94d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/z3950_search.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/z3950_search.inc >@@ -1,5 +1,4 @@ >-<script type="text/javascript"> >-//<![CDATA[ >+<script> > > var MSG_CHOOSE_Z3950 = _("Please choose at least one external target"); > >@@ -24,5 +23,4 @@ function validate_goto_page(){ > } > [% END %] > >-//]]> > </script> >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 22973
:
90031
|
90055
|
90124