From bd32ab28d6e5a74034a3541c08337b4f1d5bf400 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 16 Sep 2022 11:06:17 +0000 Subject: [PATCH] Bug 31497: (follow-up) Expand ID suffix, fix password2, remove debug Signed-off-by: Chris Cormack Signed-off-by: Tomas Cohen Arazi (cherry picked from commit f0642e4a1fca066ca48cfade8e8d50c4e7611e63) Signed-off-by: Lucas Gass --- .../prog/en/modules/members/memberentrygen.tt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 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 df6b71cfe9..7da8ffc685 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -1803,17 +1803,21 @@ legend:hover { let new_field = orig_li.clone(); new_field.children('label').each(function(){ let child_input = $(this).children('input'); - child_input.attr("id",child_input.attr("id") + "_qa"); + child_input.attr("id",child_input.attr("id") + "_quick_add"); }); new_field.appendTo("#quick_add_list"); } else { let orig_input_id = orig_li.children("input,textarea,select").attr("id"); - console.log( orig_input_id); let new_field = orig_li.clone(); - new_field.children("#"+orig_input_id).attr("id",orig_input_id + "_qa"); + new_field.children("#"+orig_input_id).attr("id",orig_input_id + "_quick_add"); new_field.appendTo("#quick_add_list"); [% UNLESS mandatorypassword %] - if( input_label == 'password' ) $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list"); + if( input_label == 'password' ){ + let orig_p2 = $("#entryform label[for='password2']").parent(); + let new_p2 = orig_p2.clone(); + new_p2.find('input[id="password2"]').attr("id","password2_quick_add"); + new_p2.appendTo("#quick_add_list"); + } [% END %] } } -- 2.39.5