Bugzilla – Attachment 57709 Details for
Bug 17344
Can't set guarantor in quick add brief form
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17344 - Followup to fix selectors
Bug-17344---Followup-to-fix-selectors.patch (text/plain), 4.37 KB, created by
Jonathan Druart
on 2016-11-22 13:19:37 UTC
(
hide
)
Description:
Bug 17344 - Followup to fix selectors
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-11-22 13:19:37 UTC
Size:
4.37 KB
patch
obsolete
>From e837d26f5f424fbd2d7a238374f2d0b03bc4021d Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 22 Nov 2016 11:28:51 +0000 >Subject: [PATCH] Bug 17344 - Followup to fix selectors > >Add '#' selector to several tags >Fix some spacing >Remove duplicated line > >To highlight that all is working set PatronQuickAddFields as below for testing: >streetnumber|address|address2|city|state|zipcode|country|branchcode > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > koha-tmpl/intranet-tmpl/prog/js/members.js | 31 +++++++++++++++--------------- > 1 file changed, 15 insertions(+), 16 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/members.js b/koha-tmpl/intranet-tmpl/prog/js/members.js >index 5089d29..3ea7868 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/members.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/members.js >@@ -186,13 +186,13 @@ function update_category_code(category_code) { > function select_user(borrowernumber, borrower) { > var form = $('#entryform').get(0); > if (form.guarantorid.value) { >- $("#contact-details,#quick_add_form #contact-details").find('a').remove(); >- $("#contactname, #contactfirstname,#quick_add_form #contact-details").parent().find('span').remove(); >+ $("#contact-details, #quick_add_form #contact-details").find('a').remove(); >+ $("#contactname, #contactfirstname, #quick_add_form #contactname, #quick_add_form #contactfirstname").parent().find('span').remove(); > } > > var id = borrower.borrowernumber; > form.guarantorid.value = id; >- $('#contact-details,#quick_add_form #contact-details') >+ $('#contact-details, #quick_add_form #contact-details') > .show() > .find('span') > .after('<a target="blank" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=' + id + '">' + id + '</a>'); >@@ -215,14 +215,14 @@ function select_user(borrowernumber, borrower) { > form.country.value = borrower.country; > form.branchcode.value = borrower.branchcode; > >- $("quick_add_form #streetnumber").val(borrower.streetnumber); >- $("quick_add_form #address").val(borrower.address); >- $("quick_add_form #address2").val(borrower.address2); >- $("quick_add_form #city").val(borrower.city); >- $("quick_add_form #state").val(borrower.state); >- $("quick_add_form #zipcode").val(borrower.zipcode); >- $("quick_add_form #country").val(borrower.country); >- $("quick_add_form #branchcode").val(borrower.branchcode); >+ $("#quick_add_form #streetnumber").val(borrower.streetnumber); >+ $("#quick_add_form #address").val(borrower.address); >+ $("#quick_add_form #address2").val(borrower.address2); >+ $("#quick_add_form #city").val(borrower.city); >+ $("#quick_add_form #state").val(borrower.state); >+ $("#quick_add_form #zipcode").val(borrower.zipcode); >+ $("#quick_add_form #country").val(borrower.country); >+ $("#quick_add_form select[name='branchcode']").val(borrower.branchcode); > > form.guarantorsearch.value = LABEL_CHANGE; > $("#quick_add_form #guarantorsearch").val(LABEL_CHANGE); >@@ -299,13 +299,12 @@ $(document).ready(function(){ > > $("fieldset.rows input, fieldset.rows select").addClass("noEnterSubmit"); > $("#guarantordelete").click(function() { >- $("#quick_add_form #contact-details,#contact-details").hide().find('a').remove(); >- $("#quick_add_form #guarantorid,#quick_add_form #contactname,#quick_add_form #contactfirstname, #guarantorid,#contactname,#contactfirstname").each(function () { this.value = ""; }); >- $("#quick_add_form #contactname, #quick_add_form #contactfirstname,#contactname,#contactfirstname") >+ $("#quick_add_form #contact-details, #contact-details").hide().find('a').remove(); >+ $("#quick_add_form #guarantorid, #quick_add_form #contactname, #quick_add_form #contactfirstname, #guarantorid, #contactname, #contactfirstname").each(function () { this.value = ""; }); >+ $("#quick_add_form #contactname, #quick_add_form #contactfirstname, #contactname, #contactfirstname") > .each(function () { this.type = 'text'; }) > .parent().find('span').remove(); >- $("#quick_add_form #guarantorsearch,#guarantorsearch").val(LABEL_SET_TO_PATRON); >- $("quick_add_form #guarantorsearch,#guarantorsearch").val(LABEL_SET_TO_PATRON); >+ $("#quick_add_form #guarantorsearch, #guarantorsearch").val(LABEL_SET_TO_PATRON); > }); > > $("#select_city").change(function(){ >-- >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 17344
:
57674
|
57678
|
57705
|
57708
| 57709