Bug 23590: Remove JS error on the suggestion list

The notify option is only available from the edit view

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2019-11-13 16:39:18 +01:00 committed by Martin Renvoize
parent dbdcae1ccb
commit 9a956d7f97
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 9 additions and 7 deletions

View File

@ -904,14 +904,16 @@
$('#managedby').val(borrowernumber);
}
var notify = $('#notify');
if ( notify.length ) {
if ( borrowernumber == [% logged_in_user.borrowernumber | html %] || borrowernumber == [% managedby_patron.borrowernumber | html %] ) {
$(notify).prop('checked', false).prop('disabled', true);
} else {
$(notify).prop('disabled', false);
[% IF op == "save" %]
var notify = $('#notify');
if ( notify.length ) {
if ( borrowernumber == [% logged_in_user.borrowernumber | html %] || borrowernumber == [% managedby_patron.borrowernumber | html %] ) {
$(notify).prop('checked', false).prop('disabled', true);
} else {
$(notify).prop('disabled', false);
}
}
}
[% END %]
}
$(document).ready(function(){