http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7628
Bug #: 7628
Summary: Required format is not enforced for Patron Categories
Classification: Unclassified
Change sponsored?: ---
Product: Koha
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P5 - low
Component: Patrons
AssignedTo: [email protected]
ReportedBy: [email protected]
QAContact: [email protected]
CC: [email protected]
Problem:
--------
If you use characters like '+' in category code, like '+TEST', you can not edit
or delete the category. Required format is not enforced.
Solution:
---------
In categorie.tt, function Check(ff), trim user input and test it for unwanted
characters.
Instead of:
-----------
if (ff.categorycode.value.length==0) {
ok=1;
_alertString += _("- categorycode missing") + "\n";
}
Put:
----
ff.categorycode.value = ff.categorycode.value.trim();
if (ff.categorycode.value.length==0) {
ok=1;
_alertString += _("- categorycode missing") + "\n";
}
else{
var patt=/^[a-zA-Z0-9\-_]+$/g;
if ( !patt.test(ff.categorycode.value) ) {
ok=1;
_alertString += _("- category code can only contain the following
characters: letters, numbers, - and _") + "\n";
}
}
--
Configure bugmail:
http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/