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").find('a').remove(); |
189 |
$("#contact-details,#quick_add_form #contact-details").find('a').remove(); |
190 |
$("#contactname, #contactfirstname").parent().find('span').remove(); |
190 |
$("#contactname, #contactfirstname,#quick_add_form #contact-details").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') |
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 200-208
function select_user(borrowernumber, borrower) {
Link Here
|
200 |
$(form.contactname) |
200 |
$(form.contactname) |
201 |
.val(borrower.surname) |
201 |
.val(borrower.surname) |
202 |
.before('<span>' + borrower.surname + '</span>').get(0).type = 'hidden'; |
202 |
.before('<span>' + borrower.surname + '</span>').get(0).type = 'hidden'; |
203 |
$(form.contactfirstname) |
203 |
$("#quick_add_form #contactname").val(borrower.surname).before('<span>'+borrower.surname+'</span.').attr({type:"hidden"}); |
|
|
204 |
$(form.contactfirstname,"#quick_add_form #contactfirstname") |
204 |
.val(borrower.firstname) |
205 |
.val(borrower.firstname) |
205 |
.before('<span>' + borrower.firstname + '</span>').get(0).type = 'hidden'; |
206 |
.before('<span>' + borrower.firstname + '</span>').get(0).type = 'hidden'; |
|
|
207 |
$("#quick_add_form #contactfirstname").val(borrower.firstname).before('<span>'+borrower.firstname+'</span.').attr({type:"hidden"}); |
206 |
|
208 |
|
207 |
form.streetnumber.value = borrower.streetnumber; |
209 |
form.streetnumber.value = borrower.streetnumber; |
208 |
form.address.value = borrower.address; |
210 |
form.address.value = borrower.address; |
Lines 213-219
function select_user(borrowernumber, borrower) {
Link Here
|
213 |
form.country.value = borrower.country; |
215 |
form.country.value = borrower.country; |
214 |
form.branchcode.value = borrower.branchcode; |
216 |
form.branchcode.value = borrower.branchcode; |
215 |
|
217 |
|
|
|
218 |
$("quick_add_form #streetnumber").val(borrower.streetnumber); |
219 |
$("quick_add_form #address").val(borrower.address); |
220 |
$("quick_add_form #address2").val(borrower.address2); |
221 |
$("quick_add_form #city").val(borrower.city); |
222 |
$("quick_add_form #state").val(borrower.state); |
223 |
$("quick_add_form #zipcode").val(borrower.zipcode); |
224 |
$("quick_add_form #country").val(borrower.country); |
225 |
$("quick_add_form #branchcode").val(borrower.branchcode); |
226 |
|
216 |
form.guarantorsearch.value = LABEL_CHANGE; |
227 |
form.guarantorsearch.value = LABEL_CHANGE; |
|
|
228 |
$("#quick_add_form #guarantorsearch").val(LABEL_CHANGE); |
217 |
|
229 |
|
218 |
return 0; |
230 |
return 0; |
219 |
} |
231 |
} |
Lines 286-299
$(document).ready(function(){
Link Here
|
286 |
}); |
298 |
}); |
287 |
|
299 |
|
288 |
$("fieldset.rows input, fieldset.rows select").addClass("noEnterSubmit"); |
300 |
$("fieldset.rows input, fieldset.rows select").addClass("noEnterSubmit"); |
289 |
|
|
|
290 |
$("#guarantordelete").click(function() { |
301 |
$("#guarantordelete").click(function() { |
291 |
$("#contact-details").hide().find('a').remove(); |
302 |
$("#quick_add_form #contact-details,#contact-details").hide().find('a').remove(); |
292 |
$("#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 = ""; }); |
293 |
$("#contactname, #contactfirstname") |
304 |
$("#quick_add_form #contactname, #quick_add_form #contactfirstname,#contactname,#contactfirstname") |
294 |
.each(function () { this.type = 'text'; }) |
305 |
.each(function () { this.type = 'text'; }) |
295 |
.parent().find('span').remove(); |
306 |
.parent().find('span').remove(); |
296 |
$("#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); |
297 |
}); |
309 |
}); |
298 |
|
310 |
|
299 |
$("#select_city").change(function(){ |
311 |
$("#select_city").change(function(){ |
300 |
- |
|
|