If password is in BorrowerMandatoryField we end up with two confirm fields - the test for matching and copying the field is unneccessary since we copy all required fields anyways. To recreate: 1 - Add password to BorrowerMandatoryField 2 - View quick add form 3 - Confirm password twice
Created attachment 63425 [details] [review] Bug 18596 - Quick add form duplicating password confirm To test: 1 - Add password to BorrowerMandatoryField 2 - View quick add form 3 - See confirm password twice 4 - Apply patch 5 - See confirm password once 6 - Add password to QuickAddFields 7 - Confirm one confirm field 8 - Remove password form BorrowerMandatory field 9 - Confirm there is one confirm field and password fields are not required
Created attachment 63426 [details] [review] Bug 18596 - Quick add form duplicating password confirm To test: 1 - Add password to BorrowerMandatoryField 2 - View quick add form 3 - See confirm password twice 4 - Apply patch 5 - See confirm password once 6 - Add password to QuickAddFields 7 - Confirm one confirm field 8 - Remove password form BorrowerMandatory field 9 - Confirm there is one confirm field and password fields are not required
Created attachment 63447 [details] [review] [SIGNED-OFF] Bug 18596 - Quick add form duplicating password confirm To test: 1 - Add password to BorrowerMandatoryField 2 - View quick add form 3 - See confirm password twice 4 - Apply patch 5 - See confirm password once 6 - Add password to QuickAddFields 7 - Confirm one confirm field 8 - Remove password form BorrowerMandatory field 9 - Confirm there is one confirm field and password fields are not required Signed-off-by: Peggy Thrasher <p.thrasher@dover.nh.gov>
Created attachment 63449 [details] [review] [SIGNED-OFF] Bug 18596 - Quick add form duplicating password confirm To test: 1 - Add password to BorrowerMandatoryField 2 - View quick add form 3 - See confirm password twice 4 - Apply patch 5 - See confirm password once 6 - Add password to QuickAddFields 7 - Confirm one confirm field 8 - Remove password form BorrowerMandatory field 9 - Confirm there is one confirm field and password fields are not required Signed-off-by: Owen Leonard <oleonard@myacpl.org>
My brain scratched just after the first line: var passwd_mandatory = [% IF mandatorypassword %]0[% ELSE %]1[% END %]; I'd suggest to not use a JS var and simply: [% UNLESS mandatorypassword %] if( input_label == 'password' ) $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list"); [% END %]
Created attachment 63555 [details] [review] Bug 18596 (QA Followup) Use TT in a less awkward way
Created attachment 63616 [details] [review] Bug 18596 - Quick add form duplicating password confirm To test: 1 - Add password to BorrowerMandatoryField 2 - View quick add form 3 - See confirm password twice 4 - Apply patch 5 - See confirm password once 6 - Add password to QuickAddFields 7 - Confirm one confirm field 8 - Remove password form BorrowerMandatory field 9 - Confirm there is one confirm field and password fields are not required Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 17.05, thanks Nick!
This patch has been pushed to 16.11.x and will be in 16.11.09.