diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt index 2275f57c57..887b81ffd6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt @@ -24,6 +24,18 @@ "iDisplayLength": 10, "sPaginationType": "four_button" })); + + [% IF ( heading_branches_add_branch_p ) %] + $("#Aform").on("submit", function( event ) { + if ( $("#branchcode").val().match(/\s/) ) { + event.preventDefault(); + alert(_("The library code entered contains whitespace characters. Please remove any whitespace characters from the library code")); + return false; + } else { + return true; + } + }); + [% END %] }); tinyMCE.init({ mode : "textareas", @@ -62,7 +74,7 @@ tinyMCE.init({