Lines 186-198
function update_category_code(category_code) {
Link Here
|
186 |
function select_user(borrowernumber, borrower) { |
186 |
function select_user(borrowernumber, borrower) { |
187 |
var form = $('#entryform').get(0); |
187 |
var form = $('#entryform').get(0); |
188 |
if (form.guarantorid.value) { |
188 |
if (form.guarantorid.value) { |
189 |
$("#contact-details,#quick_add_form #contact-details").find('a').remove(); |
189 |
$("#contact-details, #quick_add_form #contact-details").find('a').remove(); |
190 |
$("#contactname, #contactfirstname,#quick_add_form #contact-details").parent().find('span').remove(); |
190 |
$("#contactname, #contactfirstname, #quick_add_form #contactname, #quick_add_form #contactfirstname").parent().find('span').remove(); |
191 |
} |
191 |
} |
192 |
|
192 |
|
193 |
var id = borrower.borrowernumber; |
193 |
var id = borrower.borrowernumber; |
194 |
form.guarantorid.value = id; |
194 |
form.guarantorid.value = id; |
195 |
$('#contact-details,#quick_add_form #contact-details') |
195 |
$('#contact-details, #quick_add_form #contact-details') |
196 |
.show() |
196 |
.show() |
197 |
.find('span') |
197 |
.find('span') |
198 |
.after('<a target="blank" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=' + id + '">' + id + '</a>'); |
198 |
.after('<a target="blank" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=' + id + '">' + id + '</a>'); |
Lines 215-228
function select_user(borrowernumber, borrower) {
Link Here
|
215 |
form.country.value = borrower.country; |
215 |
form.country.value = borrower.country; |
216 |
form.branchcode.value = borrower.branchcode; |
216 |
form.branchcode.value = borrower.branchcode; |
217 |
|
217 |
|
218 |
$("quick_add_form #streetnumber").val(borrower.streetnumber); |
218 |
$("#quick_add_form #streetnumber").val(borrower.streetnumber); |
219 |
$("quick_add_form #address").val(borrower.address); |
219 |
$("#quick_add_form #address").val(borrower.address); |
220 |
$("quick_add_form #address2").val(borrower.address2); |
220 |
$("#quick_add_form #address2").val(borrower.address2); |
221 |
$("quick_add_form #city").val(borrower.city); |
221 |
$("#quick_add_form #city").val(borrower.city); |
222 |
$("quick_add_form #state").val(borrower.state); |
222 |
$("#quick_add_form #state").val(borrower.state); |
223 |
$("quick_add_form #zipcode").val(borrower.zipcode); |
223 |
$("#quick_add_form #zipcode").val(borrower.zipcode); |
224 |
$("quick_add_form #country").val(borrower.country); |
224 |
$("#quick_add_form #country").val(borrower.country); |
225 |
$("quick_add_form #branchcode").val(borrower.branchcode); |
225 |
$("#quick_add_form select[name='branchcode']").val(borrower.branchcode); |
226 |
|
226 |
|
227 |
form.guarantorsearch.value = LABEL_CHANGE; |
227 |
form.guarantorsearch.value = LABEL_CHANGE; |
228 |
$("#quick_add_form #guarantorsearch").val(LABEL_CHANGE); |
228 |
$("#quick_add_form #guarantorsearch").val(LABEL_CHANGE); |
Lines 299-311
$(document).ready(function(){
Link Here
|
299 |
|
299 |
|
300 |
$("fieldset.rows input, fieldset.rows select").addClass("noEnterSubmit"); |
300 |
$("fieldset.rows input, fieldset.rows select").addClass("noEnterSubmit"); |
301 |
$("#guarantordelete").click(function() { |
301 |
$("#guarantordelete").click(function() { |
302 |
$("#quick_add_form #contact-details,#contact-details").hide().find('a').remove(); |
302 |
$("#quick_add_form #contact-details, #contact-details").hide().find('a').remove(); |
303 |
$("#quick_add_form #guarantorid,#quick_add_form #contactname,#quick_add_form #contactfirstname, #guarantorid,#contactname,#contactfirstname").each(function () { this.value = ""; }); |
303 |
$("#quick_add_form #guarantorid, #quick_add_form #contactname, #quick_add_form #contactfirstname, #guarantorid, #contactname, #contactfirstname").each(function () { this.value = ""; }); |
304 |
$("#quick_add_form #contactname, #quick_add_form #contactfirstname,#contactname,#contactfirstname") |
304 |
$("#quick_add_form #contactname, #quick_add_form #contactfirstname, #contactname, #contactfirstname") |
305 |
.each(function () { this.type = 'text'; }) |
305 |
.each(function () { this.type = 'text'; }) |
306 |
.parent().find('span').remove(); |
306 |
.parent().find('span').remove(); |
307 |
$("#quick_add_form #guarantorsearch,#guarantorsearch").val(LABEL_SET_TO_PATRON); |
307 |
$("#quick_add_form #guarantorsearch, #guarantorsearch").val(LABEL_SET_TO_PATRON); |
308 |
$("quick_add_form #guarantorsearch,#guarantorsearch").val(LABEL_SET_TO_PATRON); |
|
|
309 |
}); |
308 |
}); |
310 |
|
309 |
|
311 |
$("#select_city").change(function(){ |
310 |
$("#select_city").change(function(){ |
312 |
- |
|
|