@@ -, +, @@
template
- Go to Patrons and add a patron with a "child" category type.
- In the "Guarantor information" section, click the "Set to patron"
button.
- In the pop-up window, search for a patron.
- Click the "Select" button next to a patron.
- The window should close, and the patron you selected should now appear
as the guarantor. The guarantor's address information should be added
to the "Main address" section.
---
koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt | 8 ++++++++
.../prog/en/modules/members/tables/guarantor_search.tt | 2 +-
koha-tmpl/intranet-tmpl/prog/js/members.js | 2 +-
3 files changed, 10 insertions(+), 2 deletions(-)
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt
@@ -107,6 +107,14 @@ $(document).ready(function(){
var surname = $(this).data("surname");
add_user( borrowernumber, firstname + " " + surname );
});
+
+ $("body").on("click",".select_user",function(e){
+ e.preventDefault();
+ var borrowernumber = $(this).data("borrowernumber");
+ var guarantor_data = $("#guarantor_data"+borrowernumber).val();
+ select_user( borrowernumber, JSON.parse(guarantor_data) );
+ });
+
});
function filter() {
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/guarantor_search.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/guarantor_search.tt
@@ -17,7 +17,7 @@
"dt_address":
"[% INCLUDE escape_address data=data %]",
"dt_action":
- "Select"
+ "Select"
}[% UNLESS loop.last %],[% END %]
[% END %]
]
--- a/koha-tmpl/intranet-tmpl/prog/js/members.js
+++ a/koha-tmpl/intranet-tmpl/prog/js/members.js
@@ -143,7 +143,7 @@ function Dopop(link) {
}
function Dopopguarantor(link) {
- var newin=window.open(link,'popup','width=600,height=400,resizable=no,toolbar=false,scrollbars=yes,top');
+ var newin=window.open(link,'popup','width=800,height=500,resizable=no,toolbar=false,scrollbars=yes,top');
}
function clear_entry(node) {
--