Bugzilla – Attachment 108565 Details for
Bug 26245
Remove unused functions from members.js
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26245: Remove unused functions from members.js
Bug-26245-Remove-unused-functions-from-membersjs.patch (text/plain), 3.54 KB, created by
Owen Leonard
on 2020-08-19 00:47:54 UTC
(
hide
)
Description:
Bug 26245: Remove unused functions from members.js
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2020-08-19 00:47:54 UTC
Size:
3.54 KB
patch
obsolete
>From 8c78cac8cbcd6f7c0889f5709e76553b43257522 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 19 Aug 2020 00:33:45 +0000 >Subject: [PATCH] Bug 26245: Remove unused functions from members.js > >This patch removes some code from members.js which was unused. > >To test, apply the patch and test that the process of adding or editing >a patron is unaffected. Check the Koha codebase for references to these >functions in JavaScript: > >CheckDate >unique (note: Not the jQuery function) >check_manip_date >check_password > >There should be none. >--- > koha-tmpl/intranet-tmpl/prog/js/members.js | 90 ------------------------------ > 1 file changed, 90 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/members.js b/koha-tmpl/intranet-tmpl/prog/js/members.js >index 4de6e6e198..07632256e1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/members.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/members.js >@@ -1,93 +1,3 @@ >-// this function checks id date is like DD/MM/YYYY >-function CheckDate(field) { >-var d = field.value; >-if (d!=="") { >- var amin = 1900; >- var amax = 2100; >- var date = d.split("/"); >- var ok=1; >- var msg; >- if ( (date.length < 2) && (ok==1) ) { >- msg = MSG_SEPARATOR.format(field.name); >- alert(msg); ok=0; field.focus(); >- return; >- } >- var dd = date[0]; >- var mm = date[1]; >- var yyyy = date[2]; >- // checking days >- if ( ((isNaN(dd))||(dd<1)||(dd>31)) && (ok==1) ) { >- msg = MSG_INCORRECT_DAY.format(field.name); >- alert(msg); ok=0; field.focus(); >- return false; >- } >- // checking months >- if ( ((isNaN(mm))||(mm<1)||(mm>12)) && (ok==1) ) { >- msg = MSG_INCORRECT_MONTH.format(field.name); >- alert(msg); ok=0; field.focus(); >- return false; >- } >- // checking years >- if ( ((isNaN(yyyy))||(yyyy<amin)||(yyyy>amax)) && (ok==1) ) { >- msg = MSG_INCORRECT_YEAR.format(field.name); >- alert(msg); ok=0; field.focus(); >- return false; >- } >- } >-} >- >-//function test if member is unique and if it's right the member is registred >-function unique() { >-var msg1; >-var msg2; >-if ( document.form.check_member.value==1){ >- if (document.form.categorycode.value != "I"){ >- >- msg1 += MSG_DUPLICATE_PATRON; >- alert(msg1); >- check_form_borrowers(0); >- document.form.submit(); >- >- }else{ >- msg2 += MSG_DUPLICATE_ORGANIZATION; >- alert(msg2); >- check_form_borrowers(0); >- } >-} >-else >-{ >- document.form.submit(); >-} >- >-} >-//end function >-//function test if date enrooled < date expiry >-// WARNING: format-specific test. >-function check_manip_date(status) { >-if (status=='verify'){ >-// this part of function('verify') is used to check if dateenrolled<date expiry >-if (document.form.dateenrolled !== '' && document.form.dateexpiry.value !=='') { >-var myDate1=document.form.dateenrolled.value.split ('/'); >-var myDate2=document.form.dateexpiry.value.split ('/'); >- if ((myDate1[2]>myDate2[2])||(myDate1[2]==myDate2[2] && myDate1[1]>myDate2[1])||(myDate1[2]==myDate2[2] && myDate1[1]>=myDate2[1] && myDate1[0]>=myDate2[0])) >- >- { >- document.form.dateenrolled.focus(); >- var msg = MSG_LATE_EXPIRY; >- alert(msg); >- } >- } >- } >-} >-//end function >- >-function check_password( password ) { >- if ( password.match(/^\s/) || password.match(/\s$/)) { >- return false; >- } >- return true; >-} >- > // function to test all fields in forms and nav in different forms(1 ,2 or 3) > function check_form_borrowers(nav){ > var statut=0; >-- >2.11.0
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 26245
:
108565
|
110111
|
110116