Bugzilla – Attachment 63425 Details for
Bug 18596
Quick add form duplicating password confirm
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18596 - Quick add form duplicating password confirm
Bug-18596---Quick-add-form-duplicating-password-co.patch (text/plain), 3.54 KB, created by
Nick Clemens (kidclamp)
on 2017-05-12 13:10:23 UTC
(
hide
)
Description:
Bug 18596 - Quick add form duplicating password confirm
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-05-12 13:10:23 UTC
Size:
3.54 KB
patch
obsolete
>From 6127394294aba62cd5d6e3bb783f72e97eb3fc56 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 12 May 2017 09:07:56 -0400 >Subject: [PATCH] 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 >--- > .../prog/en/modules/members/memberentrygen.tt | 19 +++++++++++-------- > 1 file changed, 11 insertions(+), 8 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 ff3ef68..0b34b96 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -44,20 +44,23 @@ $(document).ready(function() { > var toggle_to = ''; > var toggle_from = ''; > if( $("#entryform:visible").length ) { >- toggle_to = "#quick_add_form label"; >- toggle_from = "#entryform label"; >+ toggle_to = "#quick_add_form "; >+ toggle_from = "#entryform "; > } else { >- toggle_to="#entryform label"; >- toggle_from = "#quick_add_form label"; >+ toggle_to="#entryform "; >+ toggle_from = "#quick_add_form "; > } > $(toggle_from).each(function() { > var input_label = $(this).attr('for'); > if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' ) { >- $(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') ); >+ $(toggle_to+"label[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') ); > return; > } >+ if ( input_label == 'city' ) { >+ $(toggle_to+"#select_city").val( $(toggle_from+"#select_city").val() ); >+ } > if( $(this).next().val() != '' ) { >- $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() ); >+ $(toggle_to+"label[for='"+input_label+"']").next().val( $(this).next().val() ); > } > }); > >@@ -1196,7 +1199,7 @@ $(document).ready(function() { > </form> > <script> > $(document).ready(function () { >- >+ var passwd_mandatory = [% IF mandatorypassword %]0[% ELSE %]1[% END %]; > $("#entryform,#saverecord").hide(); > [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %] > var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field %]",[% END %]]; >@@ -1212,7 +1215,7 @@ $(document).ready(function() { > if ( skipped_fields.indexOf( input_label ) != -1 ) { input_label=""; } > if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){ > $(this).parent().clone().appendTo("#quick_add_list"); >- if( input_label == 'password') $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list"); >+ if( input_label === 'password' && passwd_mandatory ) $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list"); > } > }); > if( $("#memberentry_guarantor").length ) { >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18596
:
63425
|
63426
|
63447
|
63449
|
63555
|
63616