Bugzilla – Attachment 154504 Details for
Bug 26597
Transfer information from guarantor when adding a guarantor to an existing patron
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26597: (follow-up) Add disabling / enabled the save button while waiting from api to respond
0003-Bug-26597-follow-up-Add-disabling-enabled-the-save-b.patch (text/plain), 2.89 KB, created by
Emmi Takkinen
on 2023-08-17 09:00:05 UTC
(
hide
)
Description:
Bug 26597: (follow-up) Add disabling / enabled the save button while waiting from api to respond
Filename:
MIME Type:
Creator:
Emmi Takkinen
Created:
2023-08-17 09:00:05 UTC
Size:
2.89 KB
patch
obsolete
>From 528b2b863038ac314f6dbef82c48fe92ca9abce0 Mon Sep 17 00:00:00 2001 >From: Hammat Wele <hammat.wele@inlibro.com> >Date: Wed, 22 Mar 2023 15:25:43 +0000 >Subject: [PATCH 3/5] Bug 26597: (follow-up) Add disabling / enabled the save > button while waiting from api to respond > >I've updated the test plan since the REST API route takes a little time to respond > >To test: >1) Apply patch >2) Search PrefillGuaranteeField preference and make sure some fields are selected >3) Select a user that can have a guarantor >4) In the edit form, click on "Search to add" in "Patron guarantor" fieldset >5) Choose a patron who has at least one of the fields in 1) set >6) Click Select >7) Wait until save button is enabled >8) Confirm guarantee's information is filled from the guarantor's record >9) Check that any preexisting information is not overwritten > >Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> >Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> >--- > .../prog/en/modules/members/memberentrygen.tt | 2 ++ > koha-tmpl/intranet-tmpl/prog/js/members.js | 7 ++++++- > 2 files changed, 8 insertions(+), 1 deletion(-) > >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 8e359efec1..14d8e210fe 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -1929,6 +1929,8 @@ legend:hover { > }); > [% END %] > $("#guarantor_template").hide(); >+ var guarantor_attributes; >+ var to_api_mapping; > [% IF guarantor_attributes %] > guarantor_attributes = [% To.json(guarantor_attributes) %]; > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/members.js b/koha-tmpl/intranet-tmpl/prog/js/members.js >index 29dc52054c..ca4daaf287 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/members.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/members.js >@@ -122,7 +122,8 @@ function select_user(borrowernumber, borrower, relationship) { > fieldset.find('.new_guarantor_relationship').val(relationship); > } > >- if(typeof guarantor_attributes !== 'undefined' && to_api_mapping) { >+ if(guarantor_attributes && to_api_mapping) { >+ $('#saverecord').prop('disabled', true); > $.ajax({ > url: '/api/v1/patrons/'+borrowernumber, > method: "GET", >@@ -135,6 +136,10 @@ function select_user(borrowernumber, borrower, relationship) { > document.forms.entryform[attribute].value = data[key_data]; > } > } >+ $('#saverecord').prop('disabled', false); >+ }, >+ error:function(){ >+ $('#saverecord').prop('disabled', false); > } > }); > } >-- >2.34.1 >
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 26597
:
111054
|
111319
|
112196
|
142443
|
144475
|
144560
|
148564
|
148597
|
148598
|
148599
|
151850
|
151851
|
151878
|
154501
|
154503
|
154504
|
154505
|
154506
|
158119
|
158300
|
161510
|
161511
|
161512
|
161513
|
161514
|
161515
|
161516