Bugzilla – Attachment 9534 Details for
Bug 8014
On the patron entry form hide "restricted until" field if "Restricted: No" is checked
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8014 - On the patron entry form hide "restricted until" field if "Restricted: No" is checked
Bug-8014---On-the-patron-entry-form-hide-restricte.patch (text/plain), 4.86 KB, created by
Jared Camins-Esakov
on 2012-05-13 11:45:05 UTC
(
hide
)
Description:
Bug 8014 - On the patron entry form hide "restricted until" field if "Restricted: No" is checked
Filename:
MIME Type:
Creator:
Jared Camins-Esakov
Created:
2012-05-13 11:45:05 UTC
Size:
4.86 KB
patch
obsolete
>From f1ab482894877227ee4c502b420c2d29ae5f17e3 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 27 Apr 2012 08:57:16 -0400 >Subject: [PATCH] Bug 8014 - On the patron entry form hide "restricted until" field if "Restricted: No" is checked >Content-Type: text/plain; charset="UTF-8" > >This patch adds JavaScript to automatically hide the "Restricted >unil" form field on the patron entry form if "Restricted: No" is >selected. If "Restricted: Yes" is chosen the "Until:" field >is shown and focus is given to it. > >The patch also adds a note, "(optional)" after the "Until:" field >to make it clearer that a date is not required. > >To test, open a patron record and try moving the selection >between "Restricted: No" and "Restricted: Yes." Confirm that >the "Until:" field is shown and hidden as expected. Confirm >that the restricted flag is correctly set or unset upon save, >including setting the flag with or without a date. > >Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> >--- > koha-tmpl/intranet-tmpl/prog/en/js/members.js | 16 ++++++++ > .../prog/en/modules/members/memberentrygen.tt | 38 ++++++++++---------- > 2 files changed, 35 insertions(+), 19 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/members.js b/koha-tmpl/intranet-tmpl/prog/en/js/members.js >index 3ed6195..cdc1442 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/members.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/members.js >@@ -167,3 +167,19 @@ function Dopopguarantor(link) { > > var newin=window.open(link,'popup','width=600,height=400,resizable=no,toolbar=false,scrollbars=yes,top'); > } >+ >+$(document).ready(function(){ >+ if($("#yesdebarred").is(":checked")){ >+ $("#debarreduntil").show(); >+ } else { >+ $("#debarreduntil").hide(); >+ } >+ $("#yesdebarred,#nodebarred").change(function(){ >+ if($("#yesdebarred").is(":checked")){ >+ $("#debarreduntil").show(); >+ $("#datedebarred").focus(); >+ } else { >+ $("#debarreduntil").hide(); >+ } >+ }); >+}); >\ No newline at end of file >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >index 0cb2877..45a8731 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -1344,25 +1344,25 @@ > <label for="nodebarred">No </label> > <input type="radio" id="nodebarred" name="debarred" value="0" checked="checked"/> > [% END %] >- >- <br /> >- <label for="datedebarred" class="radio">until:</label> >- [% IF opduplicate %] >- <input type="text" name="datedebarred" id="datedebarred" class="debarred" value="[% datedebarred %]" onclick="this.value=''" /> >- [% ELSE %] >- <input type="text" name="datedebarred" id="datedebarred" class="debarred" value="[% datedebarred %]" /> >- [% END %] >- <img src="[% themelang %]/lib/calendar/cal.gif" id="debarred_button" alt="Show Calendar" /> >- <script language="JavaScript" type="text/javascript"> >- Calendar.setup( >- { >- inputField : "datedebarred", >- ifFormat : "[% DHTMLcalendar_dateformat %]", >- button : "debarred_button" >- } >- ); >- </script> >- <br /> >+ >+ <span id="debarreduntil"><label for="datedebarred" class="inline">Until:</label> >+ [% IF opduplicate %] >+ <input type="text" name="datedebarred" id="datedebarred" class="debarred" value="[% datedebarred %]" onclick="this.value=''" /> >+ [% ELSE %] >+ <input type="text" name="datedebarred" id="datedebarred" class="debarred" value="[% datedebarred %]" /> >+ [% END %] >+ <img src="[% themelang %]/lib/calendar/cal.gif" id="debarred_button" alt="Show Calendar" /> >+ <script language="JavaScript" type="text/javascript"> >+ Calendar.setup( >+ { >+ inputField : "datedebarred", >+ ifFormat : "[% DHTMLcalendar_dateformat %]", >+ button : "debarred_button" >+ } >+ ); >+ </script> <span class="hint">(optional)</span> </span> >+ </li> >+ <li> > <label for="debarredcomment" class="radio">Comment:</label> > [% IF ( opduplicate ) %] > <textarea id="debarredcomment" name="debarredcomment" cols="55" rows="3" onclick="this.value=''">[% debarredcomment %]</textarea> >-- >1.7.2.5
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 8014
:
9312
| 9534