Bugzilla – Attachment 34868 Details for
Bug 13441
Branchcodes should not be allowed to have spaces in them
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13441 - Branchcodes should not be allowed to have spaces in them
Bug-13441---Branchcodes-should-not-be-allowed-to-h.patch (text/plain), 3.11 KB, created by
Marc Véron
on 2015-01-02 13:20:25 UTC
(
hide
)
Description:
Bug 13441 - Branchcodes should not be allowed to have spaces in them
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2015-01-02 13:20:25 UTC
Size:
3.11 KB
patch
obsolete
>From 56b7dfd78273a3db316f153436f0ed9f48c9d91b Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 1 Jan 2015 16:38:34 -0500 >Subject: [PATCH] Bug 13441 - Branchcodes should not be allowed to have spaces > in them >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >In multiple cases I've seen issues arise in Koha where a librarian >accidentally puts a space at the end of a new branchcode. This of course >causes endless confusion because the branchcode looks perfectly fine in >every case unless you wrap the code with some characters to reveal the >hidden space! > >Test Plan: >1) Try creating a new branch with one or more spaces in the branchcode >2) Note you are able to >3) Apply this patch >4) Repeat step 1 >5) Note you are no longer able to > >Followed test plan with cache cleared. Works as expected. >Signed-off-by: Marc Véron <veron@veron.ch> >--- > .../prog/en/modules/admin/branches.tt | 20 ++++++++++++++++---- > 1 file changed, 16 insertions(+), 4 deletions(-) > >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 2275f57..887b81f 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({ > </div> > > <div id="doc3" class="yui-t2"> >- >+ > <div id="bd"> > <div id="yui-main"> > <div class="yui-b"> >@@ -247,7 +259,7 @@ tinyMCE.init({ > [% ELSE %] > <div class="dialog message">There are no libraries defined. <a href="/cgi-bin/koha/admin/branches.pl?op=add">Start defining libraries</a>.</div> > [% END %] >- >+ > [% IF ( branchcategories ) %] > [% FOREACH branchcategorie IN branchcategories %] > <h3>Group(s): [% IF ( branchcategorie.properties ) %]Properties[% ELSE %][% IF ( branchcategorie.searchdomain ) %]Search domain[% END %][% END %]</h3> >@@ -297,7 +309,7 @@ tinyMCE.init({ > <input type="hidden" name="add" value="1"> > [% END %] > <fieldset class="rows"> >- >+ > <ol><li> > [% IF ( categorycode ) %] > <span class="label">Category code: </span> >@@ -344,7 +356,7 @@ tinyMCE.init({ > > [% IF ( delete_category ) %] > [% UNLESS ( MESSAGE8 ) %] >- <div class="dialog message"> >+ <div class="dialog message"> > Confirm delete: > <form action="[% action %]" method="post"> > <input type="hidden" name="op" value="categorydelete_confirmed" /> >-- >1.7.10.4
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 13441
:
34859
|
34860
|
34868
|
34918