From a0a23dd6642050639196bfd30956010cde47572b Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 11 Nov 2014 11:09:17 -0500 Subject: [PATCH] Bug 9177 - Duplicate patron: Prepopulated fields ar cleared when setting cursor When adding a duplicated patron record some fields are prepopulated from the original patron record. Focusing your cursor on these fields automatically clears them. This works well if you assume that the user only focuses on fields which should be changed. This works badly if you consider that a user might want to tab between all fields. I think the disadvantages outweigh the minor benefit of not having to delete the contents of a field. This patch removes the clearing action. TEST PLAN --------- 1) Log in to staff client 2) Patrons 3) Find an existing patron 4) Click on the link in the Name column 5) Click on the Duplicate button 6) Click on fields with data in them. -- they will clear, which is more problematic than correcting the entry. 7) On the line "Home > Patrons > {patron name} > Duplicate Adult Patron" click the patron name to go back. 8) Click on the Duplicate button 9) Tab through the fields -- the fields should remain unchanged, but sadly they clear. 10) Apply the patch 11) On the line "Home > Patrons > {patron name} > Duplicate Adult Patron" click the patron name to go back. 12) Click on the Duplicate button 13) Navigate through the fields -- tabbing nor clicking should clear any fields. 14) Run koha qa tests NOTE: Had to rebase and tweak, but looks good. Signed-off-by: Mark Tompsett --- .../prog/en/modules/members/memberentrygen.tt | 84 ++++++++++---------- 1 file changed, 40 insertions(+), 44 deletions(-) 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 96777e1..6cfd859 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -1,4 +1,3 @@ -[% IF ( opduplicate ) %][% SET focusAction = "clearDupe" %][% END %] [% USE Koha %] [% USE KohaDates %] [% INCLUDE 'doc-head-open.inc' %] @@ -26,9 +25,6 @@ document.form.state.value=RegExp.$3; document.form.country.value=RegExp.$4; }); - $(".clearDupe").on("focus",function(){ - $(this).val(""); - }) [% IF categorycode %] update_category_code( "[% categorycode %]" ); @@ -269,9 +265,9 @@ [% END %] Surname: [% IF ( uppercasesurnames ) %] - + [% ELSE %] - + [% END %] [% IF ( mandatorysurname ) %]Required[% END %] @@ -317,7 +313,7 @@ - + [% IF ( mandatoryinitials ) %]Required[% END %] [% END %] @@ -330,7 +326,7 @@ - + [% IF ( mandatoryothernames ) %]Required[% END %] [% IF ( I ) %][% END %] @@ -379,7 +375,7 @@ [% contactname %] [% ELSE %] - + [% END %] [% ELSE %] @@ -398,7 +394,7 @@ [% contactname %] [% ELSE %] - + [% END %] [% END %] @@ -409,7 +405,7 @@ [% contactfirstname %] [% ELSE %] - + [% END %] [% END %] @@ -453,7 +449,7 @@ - + [% IF ( mandatorystreetnumber ) %]Required[% END %] [% END %] @@ -488,7 +484,7 @@ - + [% IF ( mandatoryaddress ) %]Required[% END %] [% END %] @@ -500,7 +496,7 @@ - + [% IF ( mandatoryaddress2 ) %]Required[% END %] [% END %] @@ -512,7 +508,7 @@ - + [% IF ( city_cgipopup ) %]or choose + [% IF ( mandatorystate ) %]Required[% END %] [% END %] @@ -549,7 +545,7 @@ - + [% IF ( mandatoryzipcode ) %]Required[% END %] [% END %] @@ -561,7 +557,7 @@ - + [% IF ( mandatorycountry ) %]Required[% END %] [% END %] @@ -580,7 +576,7 @@ - + [% IF ( mandatoryphone ) %]Required[% END %]
Shows on transit slips
@@ -593,7 +589,7 @@ - + [% IF ( mandatoryphonepro ) %]Required[% END %] [% END %] @@ -605,7 +601,7 @@ - + [% IF ( mandatorymobile ) %]Required[% END %] [% END %] @@ -617,7 +613,7 @@ - + [% IF ( mandatoryemail ) %]Required[% END %]
Shows on transit slips
@@ -630,7 +626,7 @@ - + [% IF ( mandatoryemailpro ) %]Required[% END %] [% END %] @@ -642,7 +638,7 @@ - + [% IF ( mandatoryfax ) %]Required[% END %] [% END %] @@ -665,7 +661,7 @@ - + [% IF ( mandatoryB_address ) %]Required[% END %] [% END %] @@ -677,7 +673,7 @@ - + [% IF ( mandatoryB_address2 ) %]Required[% END %] [% END %] @@ -689,7 +685,7 @@ - + [% IF ( mandatoryB_city ) %]Required[% END %] [% END %] @@ -701,7 +697,7 @@ - + [% IF ( mandatoryB_state ) %]Required[% END %] [% END %] @@ -713,7 +709,7 @@ - + [% IF ( mandatoryB_zipcode ) %]Required[% END %] [% END %] @@ -725,7 +721,7 @@ - + [% IF ( mandatoryB_country ) %]Required[% END %] [% END %] @@ -737,7 +733,7 @@ - + [% IF ( mandatoryB_phone ) %]Required[% END %] [% END %] @@ -749,7 +745,7 @@ - + [% IF ( mandatoryB_email ) %]Required[% END %] [% END %] [% UNLESS nocontactnote %] @@ -780,7 +776,7 @@ - + [% IF ( mandatoryaltcontactsurname ) %]Required[% END %] [% END %] @@ -792,7 +788,7 @@ - + [% IF ( mandatoryaltcontactfirstname ) %]Required[% END %] [% END %] @@ -804,7 +800,7 @@ - + [% IF ( mandatoryaltcontactaddress1 ) %]Required[% END %] [% END %] @@ -816,7 +812,7 @@ - + [% IF ( mandatoryaltcontactaddress2 ) %]Required[% END %] [% END %] @@ -828,7 +824,7 @@ - + [% IF ( mandatoryaltcontactaddress3 ) %]Required[% END %] [% END %] @@ -840,7 +836,7 @@ - + [% IF ( mandatoryaltcontactstate ) %]Required[% END %] [% END %] @@ -852,7 +848,7 @@ - + [% IF ( mandatoryaltcontactzipcode ) %]Required[% END %] [% END %] @@ -864,7 +860,7 @@ - + [% IF ( mandatoryaltcontactcountry ) %]Required[% END %] [% END %] @@ -876,7 +872,7 @@ - + [% IF ( mandatoryaltcontactphone ) %]Required[% END %] [% END %] @@ -958,7 +954,7 @@ - [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=sort1, class=focusAction, size = 20 %] + [% PROCESS 'av-build-dropbox.inc' name="sort1", category="Bsort1", default=sort1, size = 20 %] [% IF ( mandatorysort1 ) %]Required[% END %] [% END %] @@ -970,7 +966,7 @@ - [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, class=focusAction, size = 20 %] + [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, size = 20 %] [% IF ( mandatorysort2 ) %]Required[% END %] [% END %] @@ -1377,7 +1373,7 @@ [% INCLUDE 'messaging-preference-form.inc' %] [% IF ( SMSSendDriver ) %]

- +

[% END %] -- 1.7.9.5