diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-icon-selection.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-icon-selection.inc
index 189a737e67..2f352a72c8 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-icon-selection.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-icon-selection.inc
@@ -74,11 +74,11 @@
[% IF image_location.match('^http') %]
-
+
[% ELSE %]
-
+
[% END %]
[% END %]
[% END # /tab_panels %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt
index 0a6f7f728c..232a11d1f3 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt
@@ -403,53 +403,7 @@
[% Asset.js("js/admin-menu.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
[% INCLUDE 'select2.inc' %]
-
+ [% Asset.js("js/pages/authorised_values.js") | $raw %]
[% END %]
[% BLOCK category_descriptions %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt
index f5bd2e4ffc..46e67b69ae 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt
@@ -554,41 +554,7 @@
table_settings['columns'].shift(); // Remove item type image column from configuration
[% END %]
-
+ [% Asset.js("js/pages/itemtypes.js") | $raw %]
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]
diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/authorised_values.js b/koha-tmpl/intranet-tmpl/prog/js/pages/authorised_values.js
new file mode 100644
index 0000000000..34e9dfe03d
--- /dev/null
+++ b/koha-tmpl/intranet-tmpl/prog/js/pages/authorised_values.js
@@ -0,0 +1,50 @@
+$(document).ready(function () {
+ $("#categoriest").kohaTable({
+ order: [[0, "asc"]],
+ pagingType: "full",
+ });
+
+ if ($("#branches option:selected").length < 1) {
+ $("#branches option:first").attr("selected", "selected");
+ }
+
+ $(".delete").click(function () {
+ return confirm(
+ __("Are you sure you want to delete this authorized value?")
+ );
+ });
+ $("#category_search").change(function () {
+ $("#category").submit();
+ });
+
+ $("#delete_category").on("submit", function () {
+ return confirm(
+ __(
+ "Are you sure you want to delete this authorized value category?"
+ )
+ );
+ });
+
+ if ($("#icons .tab-pane.active").length < 1) {
+ $("#icons a:first").tab("show");
+ }
+
+ $("#Aform").submit(function () {
+ if ($("#authorised_value").length) {
+ if (!$("#authorised_value").get(0).checkValidity()) {
+ alert(__("Authorised value should be numeric."));
+ $("#authorised_value").focus();
+ return false;
+ }
+ }
+ return true;
+ });
+
+ if ($("#library_limitation").length > 0) {
+ $("#library_limitation")[0].style.minWidth = "450px";
+ $("#library_limitation").select2();
+ }
+ $("#remoteimage").on("mousedown", function () {
+ document.getElementById("remote_image_check").checked = true;
+ });
+});
diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/itemtypes.js b/koha-tmpl/intranet-tmpl/prog/js/pages/itemtypes.js
new file mode 100644
index 0000000000..65e05fcefa
--- /dev/null
+++ b/koha-tmpl/intranet-tmpl/prog/js/pages/itemtypes.js
@@ -0,0 +1,32 @@
+$(document).ready(function () {
+ $("#table_item_type").kohaTable(
+ {
+ pagingType: "full",
+ },
+ table_settings
+ );
+
+ $("#itemtypeentry").validate({
+ rules: {
+ itemtype: { required: true },
+ description: { required: true },
+ rentalcharge: { number: true },
+ rentalcharge_hourly: { number: true },
+ defaultreplacecost: { number: true },
+ },
+ });
+ $("#itemtype").on("blur", function () {
+ toUC(this);
+ });
+ if ($("#icons .tab-pane.active").length < 1) {
+ $("#icons a:first").tab("show");
+ }
+
+ if ($("#library_limitation").length > 0) {
+ $("#library_limitation")[0].style.minWidth = "450px";
+ $("#library_limitation").select2();
+ }
+ $("#remoteimage").on("mousedown", function () {
+ document.getElementById("remote_image_check").checked = true;
+ });
+});