Bugzilla – Attachment 52586 Details for
Bug 3534
Patron quick add form
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 3534 (QA Followup) Fix indentation, show guarantor form, ignore bad data in pref
Bug-3534-QA-Followup-Fix-indentation-show-guaranto.patch (text/plain), 4.49 KB, created by
Nick Clemens (kidclamp)
on 2016-06-20 13:16:12 UTC
(
hide
)
Description:
Bug 3534 (QA Followup) Fix indentation, show guarantor form, ignore bad data in pref
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2016-06-20 13:16:12 UTC
Size:
4.49 KB
patch
obsolete
>From db1aece3d9483306a859606005f5d690822e6f81 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 8 Jun 2016 13:39:02 -0400 >Subject: [PATCH] Bug 3534 (QA Followup) Fix indentation, show guarantor form, > ignore bad data in pref > >Switch incorrect == to != when checking skipped fields >--- > .../prog/en/modules/admin/preferences/patrons.pref | 2 +- > .../prog/en/modules/members/memberentrygen.tt | 29 +++++++++++++++------- > 2 files changed, 21 insertions(+), 10 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >index 61c1bd6..fcb3887 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >@@ -103,7 +103,7 @@ Patrons: > - pref: PatronQuickAddFields > class: multi > - (separate columns with |) >- - "add these fields to the patron quick add form when entering a new patron. Displays only mandatory fields and fields specified here" >+ - "add these fields to the patron quick add form when entering a new patron. Displays only mandatory fields and fields specified here. If applicable the guarantor form will be shown as well, individual fields in that form will be ignored." > - > - "Use the SMS::Send::" > - pref: SMSSendDriver >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 b0e4c15..d236447 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -35,10 +35,12 @@ $(document).ready(function() { > $(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') ); >- return; >+ $(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() ); > } >- if( $(this).next().val() != '' ) { $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );} > }); > > $(".toggler").toggle(); >@@ -1095,16 +1097,25 @@ $(document).ready(function() { > $(document).ready(function () { > $("#entryform").hide(); > [% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %] >- var qaddfields = "[% FOREACH field IN q_add_f.unique %][% field %] [% END %]"; >+ var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field %]",[% END %]]; >+ var skipped_fields = ["contactname","contactfirstname","relationship"]; //Guarantor form is pulled as a whole, ignore individual fields > $("#entryform label").each(function () { > var input_label = $(this).attr('for'); >- if ( input_label == 'sex-female' ) { input_label='sex'; } >- else if ( input_label == 'btitle' ) { input_label='title'; } >+ if ( input_label == 'sex-female' ) { >+ input_label='sex'; >+ } >+ else if ( input_label == 'btitle' ) { >+ input_label='title'; >+ } >+ 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"); >+ $(this).parent().clone().appendTo("#quick_add_list"); >+ if( input_label == 'password') $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list"); >+ } >+ }); >+ if( $("#memberentry_guarantor").length ) { >+ $("#memberentry_guarantor").clone().appendTo("#quick_add_list").css("margin",0); > } >- }); > $("#quick_add_form").show(); > }); > </script> >-- >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 3534
:
1396
|
50090
|
50091
|
50092
|
50093
|
50362
|
50410
|
50413
|
50414
|
50665
|
50666
|
50729
|
51382
|
51389
|
51445
|
51446
|
51960
|
51961
|
52192
|
52584
|
52585
|
52586
|
52934
|
52935
|
52936
|
52937
|
53109
|
53152
|
53171
|
53172
|
53173
|
53174
|
53175
|
84851