Bugzilla – Attachment 25563 Details for
Bug 11809
OPAC patron details form shouldn't show 'Clear date' if field is required
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 11809 - OPAC patron details form shouldn't show 'Clear date' if field is required
PASSED-QA-Bug-11809---OPAC-patron-details-form-sho.patch (text/plain), 4.16 KB, created by
Katrin Fischer
on 2014-02-23 21:53:26 UTC
(
hide
)
Description:
[PASSED QA] Bug 11809 - OPAC patron details form shouldn't show 'Clear date' if field is required
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-02-23 21:53:26 UTC
Size:
4.16 KB
patch
obsolete
>From b4f8beb63c01dc6cd68b1588271a53b1c92335cf Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 21 Feb 2014 10:35:40 -0500 >Subject: [PATCH] [PASSED QA] Bug 11809 - OPAC patron details form shouldn't > show 'Clear date' if field is required >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >On the OPAC's patron details form, if the date of birth field is >required we shouldn't offer the user a "clear date." This patch removes >the "clear date" link if the field is required. > >To test, configure the BorrowerMandatoryField system preference to >require dateofbirth. Enable the OPACPatronDetails system preference and >log in to the OPAC. View the "personal details" form and confirm that >there is no "clear date" link next to the required date of birth field. > >Remove dateofbirth from the BorrowerMandatoryField system preference and >re-test. The "clear date" link should appear. > >Test in both prog and Bootstrap themes. > >I tested with prog and bootstrap themes, adding/removing field 'dateofbirth' >in sys pref PatronSelfRegistrationBorrowerMandatoryField. >Patch behaves as expected. >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Works as expected, passes all tests and QA script. >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt | 4 +++- > koha-tmpl/opac-tmpl/prog/en/modules/opac-memberentry.tt | 4 +++- > 2 files changed, 6 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >index efc210c..386c861 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >@@ -161,7 +161,9 @@ > <input type="text" id="borrower_dateofbirth" name="borrower_dateofbirth" value="[% borrower.dateofbirth | $KohaDates %]" size="10" /> > > [% UNLESS action == 'edit' && !OPACPatronDetails %] >- <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('borrower_dateofbirth').value='';return false;">Clear date</a> >+ [% UNLESS ( mandatory.defined('dateofbirth') ) %] >+ <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('borrower_dateofbirth').value='';return false;">Clear date</a> >+ [% END %] > [% END %] > > [% IF mandatory.defined('dateofbirth') %]<span class="required">Required</span>[% END %] >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-memberentry.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-memberentry.tt >index 6913860..ec1fa71 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-memberentry.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-memberentry.tt >@@ -168,7 +168,9 @@ > <input type="text" id="borrower_dateofbirth" name="borrower_dateofbirth" value="[% borrower.dateofbirth | $KohaDates %]" size="10" /> > > [% UNLESS action == 'edit' && !OPACPatronDetails %] >- <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('borrower_dateofbirth').value='';return false;">Clear date</a> >+ [% UNLESS ( mandatory.defined('dateofbirth') ) %] >+ <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('borrower_dateofbirth').value='';return false;">Clear date</a> >+ [% END %] > [% END %] > > [% IF mandatory.defined('dateofbirth') %]<span class="required">Required</span>[% END %] >-- >1.8.3.2
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 11809
:
25544
|
25558
| 25563