Bug 13423: Remove unused JS function in serials-edit.tt
This patch removes unused code:
* barcode_check() function, with untranslatable strings
* commented call to this function
To test:
1. Apply the patch
2. Check serials receive, no changes shall be detected
NOTE: I did not run this test plan.
Verification steps
------------------
1. Find out where barcode_check is used.
$ git grep barcode_check
-- This is only in serials-edit.tt and serials-receive.tt
2. This patch only affects serials-edit.tt, so
check who put the <!--onsubmit="return barcode_check()">-->
$ git blame -L130 koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt
-- note the commit related number.
3. Check out the commit.
$ git show 77b64098
-- should show bug 5917, but the patches on bugzilla don't
have the change nicely, so...
4. Hunt through the pages to find the change.
-- Note: it is part of a "new file" diff!
5. Since this code hasn't been running since it was added...
6. apply the patch
7. run koha-qa test tools
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
parent
c7a4b7e51b
commit
9bfa7f9e29
|
|
@ -16,36 +16,6 @@ function popup(subscriptionid) {
|
|||
window.open("subscription-renew.pl?subscriptionid="+subscriptionid,"subscription_renewal",'width=700,height=400,toolbar=false,scrollbars=yes');
|
||||
}
|
||||
|
||||
function barcode_check(){
|
||||
[% IF ( count ) %]
|
||||
var count = [% count %];
|
||||
for(var i=1;i<=count;i++){
|
||||
|
||||
var barcodenum = "barcode"+i;
|
||||
var statusnum = "status"+i;
|
||||
var elembarcode = "document.getElementById('"+barcodenum+"')";
|
||||
var elemstatus = "document.getElementById('"+statusnum+"')";
|
||||
// alert(elembarcode+"\n"+eval(elembarcode+".value));
|
||||
// alert(elemstatus+"\n"+eval(elemstatus+".value"));
|
||||
if(eval(elembarcode+".value") =='' && eval(elemstatus+".value") == 2){
|
||||
var answer = confirm("Leave barcode blank?\n - Note: unable to change this later");
|
||||
if (answer){
|
||||
document.f.submit();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(eval(elembarcode+".value".indexOf('TEMP')) > 0 && eval(elemstatus+".value") == 2){
|
||||
var answer = confirm("A barcode was not entered.\nDo you want to put in a barcode\nor do you want to use a system generated barcode?");
|
||||
if (answer){
|
||||
document.f.submit();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
[% END %]
|
||||
}
|
||||
function unHideItems(index,labelindex, serialId) {
|
||||
subfield = document.getElementById(index);
|
||||
subfield.style.display = 'block';
|
||||
|
|
@ -127,7 +97,6 @@ $(document).ready(function() {
|
|||
[% IF ( callnumber ) %] callnumber: [% callnumber %][% END %]</h1>
|
||||
[% IF internalnotes %]<p>Nonpublic note: [% internalnotes %]</p>[% END %]
|
||||
<form method="post" name="f" action="serials-edit.pl" id="serials_edit">
|
||||
<!--onsubmit="return barcode_check()">-->
|
||||
|
||||
[% IF ( Errors ) %]
|
||||
<div class="dialog alert">
|
||||
|
|
|
|||
Loading…
Reference in New Issue