From 2eff7c0faff8faf73200d173f2f893ef52ea0b25 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 24 Mar 2020 12:12:06 +0100 Subject: [PATCH] Bug 23590: Fix 'select manager' when creation a suggestion On creating the TT var managedby_patron does not exist yet Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize --- .../intranet-tmpl/prog/en/modules/suggestion/suggestion.tt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt index 78ed07ff66..7fdec3618b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt @@ -916,7 +916,11 @@ [% IF op == "save" %] var notify = $('#notify'); if ( notify.length ) { - if ( borrowernumber == [% logged_in_user.borrowernumber | html %] || borrowernumber == [% managedby_patron.borrowernumber | html %] ) { + [% IF managedby_patron %] + if ( borrowernumber == [% logged_in_user.borrowernumber | html %] || borrowernumber == [% managedby_patron.borrowernumber | html %] ) { + [% ELSE %] + if ( borrowernumber == [% logged_in_user.borrowernumber | html %] ) { + [% END %] $(notify).prop('checked', false).prop('disabled', true); } else { $(notify).prop('disabled', false); -- 2.39.5