From 3a23bdaa290d97c25b815c150e9ebe8216bc84f2 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 again. Yes, bug 7878 interfered. However, it deals with comment #6, which Owen appropriately noted. Signed-off-by: Mark Tompsett Signed-off-by: Katrin Fischer Less surprises, improves accessibility by enabling to tab through the form without losing data. Signed-off-by: Tomas Cohen Arazi --- .../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 3f3fff2396..f9da10b3b8 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 %] @@ -386,7 +382,7 @@ [% contactname %] [% ELSE %] - + [% END %] [% ELSE %] @@ -405,7 +401,7 @@ [% contactname %] [% ELSE %] - + [% END %] [% END %] @@ -416,7 +412,7 @@ [% contactfirstname %] [% ELSE %] - + [% END %] [% END %] @@ -460,7 +456,7 @@ - + [% IF ( mandatorystreetnumber ) %]Required[% END %] [% END %] @@ -495,7 +491,7 @@ - + [% IF ( mandatoryaddress ) %]Required[% END %] [% END %] @@ -507,7 +503,7 @@ - + [% IF ( mandatoryaddress2 ) %]Required[% END %] [% END %] @@ -519,7 +515,7 @@ - + [% IF ( city_cgipopup ) %]or choose + [% IF ( mandatorystate ) %]Required[% END %] [% END %] @@ -556,7 +552,7 @@ - + [% IF ( mandatoryzipcode ) %]Required[% END %] [% END %] @@ -568,7 +564,7 @@ - + [% IF ( mandatorycountry ) %]Required[% END %] [% END %] @@ -587,7 +583,7 @@ - + [% IF ( mandatoryphone ) %]Required[% END %]
Shows on transit slips
@@ -600,7 +596,7 @@ - + [% IF ( mandatoryphonepro ) %]Required[% END %] [% END %] @@ -612,7 +608,7 @@ - + [% IF ( mandatorymobile ) %]Required[% END %] [% END %] @@ -624,7 +620,7 @@ - + [% IF ( mandatoryemail ) %]Required[% END %]
Shows on transit slips
@@ -637,7 +633,7 @@ - + [% IF ( mandatoryemailpro ) %]Required[% END %] [% END %] @@ -649,7 +645,7 @@ - + [% IF ( mandatoryfax ) %]Required[% END %] [% END %] @@ -672,7 +668,7 @@ - + [% IF ( mandatoryB_address ) %]Required[% END %] [% END %] @@ -684,7 +680,7 @@ - + [% IF ( mandatoryB_address2 ) %]Required[% END %] [% END %] @@ -696,7 +692,7 @@ - + [% IF ( mandatoryB_city ) %]Required[% END %] [% END %] @@ -708,7 +704,7 @@ - + [% IF ( mandatoryB_state ) %]Required[% END %] [% END %] @@ -720,7 +716,7 @@ - + [% IF ( mandatoryB_zipcode ) %]Required[% END %] [% END %] @@ -732,7 +728,7 @@ - + [% IF ( mandatoryB_country ) %]Required[% END %] [% END %] @@ -744,7 +740,7 @@ - + [% IF ( mandatoryB_phone ) %]Required[% END %] [% END %] @@ -756,7 +752,7 @@ - + [% IF ( mandatoryB_email ) %]Required[% END %] [% END %] [% UNLESS nocontactnote %] @@ -787,7 +783,7 @@ - + [% IF ( mandatoryaltcontactsurname ) %]Required[% END %] [% END %] @@ -799,7 +795,7 @@ - + [% IF ( mandatoryaltcontactfirstname ) %]Required[% END %] [% END %] @@ -811,7 +807,7 @@ - + [% IF ( mandatoryaltcontactaddress1 ) %]Required[% END %] [% END %] @@ -823,7 +819,7 @@ - + [% IF ( mandatoryaltcontactaddress2 ) %]Required[% END %] [% END %] @@ -835,7 +831,7 @@ - + [% IF ( mandatoryaltcontactaddress3 ) %]Required[% END %] [% END %] @@ -847,7 +843,7 @@ - + [% IF ( mandatoryaltcontactstate ) %]Required[% END %] [% END %] @@ -859,7 +855,7 @@ - + [% IF ( mandatoryaltcontactzipcode ) %]Required[% END %] [% END %] @@ -871,7 +867,7 @@ - + [% IF ( mandatoryaltcontactcountry ) %]Required[% END %] [% END %] @@ -883,7 +879,7 @@ - + [% IF ( mandatoryaltcontactphone ) %]Required[% END %] [% END %] @@ -965,7 +961,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 %] @@ -977,7 +973,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 %] @@ -1384,7 +1380,7 @@ [% INCLUDE 'messaging-preference-form.inc' %] [% IF ( SMSSendDriver ) %]

- +

[% END %] -- 2.39.2