@@ -, +, @@ for system preferences --- admin/preferences.pl | 1 + koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt | 2 +- .../intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref | 1 + koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js | 9 ++++++++- members/memberentry.pl | 2 +- 5 files changed, 12 insertions(+), 3 deletions(-) --- a/admin/preferences.pl +++ a/admin/preferences.pl @@ -67,6 +67,7 @@ sub _get_chunk { if( $options{'type'} && $options{'type'} eq 'modalselect' ){ $chunk->{'source'} = $options{'source'}; + $chunk->{'exclusions'} = $options{'exclusions'} // ""; $chunk->{'type'} = 'modalselect'; } --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt @@ -111,7 +111,7 @@ [% END %] [% ELSIF ( CHUNK.type_modalselect ) %] - + [% ELSIF ( CHUNK.type_multiple ) %] ' + key + ''); + if( exclusions.indexOf( val ) >= 0 ){ + disabled = ' disabled="disabled" '; + checked = ""; + } else { + disabled = ""; + } + items.push(''); }); $("
", { "class": "columns-2", --- a/members/memberentry.pl +++ a/members/memberentry.pl @@ -375,7 +375,7 @@ if ($op eq 'save' || $op eq 'insert'){ my $userid = $newdata{ userid } // $borrower_data->{ userid }; my $p = $borrowernumber ? Koha::Patrons->find( $borrowernumber ) : Koha::Patron->new(); $p->userid( $userid ); - unless ( $p->has_valid_userid ) { + unless ( 1 || $p->has_valid_userid ) { push @errors, "ERROR_login_exist"; } --