Koha/koha-tmpl/intranet-tmpl/prog/en/includes/validator-strings.inc
Owen Leonard 9ea7fbcb30
Bug 25002: JS Includes should be wrapped with template comments
This patch adds HTML comments to Template::Toolkit include files which
contain <script> tags so that it is clear where the embedded scripts can
be found in the code.

To test, apply the patch and view source on the following pages to
verify the presence of the comments:

Acquisitions home page:
  - acquisitions-toolbar.inc
  - validtor-strings.inc
  - js_includes.inc
  - format-price.inc
Acquisitions -> Add order from new record,
Acquisitions -> Receive order:
  - additem.js.inc
Cataloging -> Add/Edit item:
  - columns_settings.inc
  - strings.inc
  - select2.inc
  - calendar.inc
  - str/cataloging_additem.inc
Authorities home page:
  - authorities_js.inc
Bibliographic detail page:
  - catalog-strings.inc
Cataloging -> Advanced editor:
  - cateditor-ui.inc
  - cateditor-widgets-marc21.inc
Administration -> Item types:
  - greybox.inc
ILL requests:
  - ill-list-table-strings.inc
Web installer
  - installer-intranet-bottom.inc
Web installer -> Onboarding
  - installer-strings.inc
Lists -> List contents -> Merge records
  - merge-record-strings.inc
Patrons -> Patron -> Change password
  - password_check.inc
  - str/members-menu.inc
Patrons -> Patron -> Print summary
  - slip-print.inc
Circulation -> Check out
  - timepicker.inc
Administration -> System preferences:
  - str/tinymce_i18n.inc
  - wysiwyg-systempreferences.inc
Cataloging -> Z39.50 Search:
  - z3950_search.inc

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-29 17:15:20 +01:00

24 lines
1.3 KiB
PHP

<!-- validator-strings.inc -->
<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>
<!-- / validator-strings.inc -->