From c762cd827e0a80960f3b23513981a382025b3bee Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 18 May 2017 22:00:44 -0400 Subject: [PATCH] Bug 18598 - Quick add form doesn't clear values when switching MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit To test: 1 - Fill out some fields in quick add 2 - Switch to full form and clear fields 3 - Switch back and fields are still populated 4 - Fill a field in long form 5 - Switch to quick add and clear it 6 - Save 7 - Value set in 4 is saved 8 - Apply patch 9 - Repeat 1-6 - values should be cleared and not saved Signed-off-by: Marc Véron Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- .../intranet-tmpl/prog/en/modules/members/memberentrygen.tt | 4 +--- 1 file changed, 1 insertion(+), 3 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 c9ca443a68..870529555d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -56,9 +56,7 @@ $(document).ready(function() { $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') ); return; } - if( $(this).next().val() != '' ) { - $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() ); - } + $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() ); }); $(".toggler").toggle(); -- 2.39.5