View | Details | Raw Unified | Return to bug 25498
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt (+2 lines)
Lines 156-161 Link Here
156
                            <span>The item has not been added to the list. Please check it's not already in the list.</span>
156
                            <span>The item has not been added to the list. Please check it's not already in the list.</span>
157
                        [% CASE 'error_on_remove_share' %]
157
                        [% CASE 'error_on_remove_share' %]
158
                            <span>The share has not been removed.</span>
158
                            <span>The share has not been removed.</span>
159
                        [% CASE 'no_email_found' %]
160
                            <span>No email found for the patrons that accepted the share</span>
159
                        [% CASE 'success_on_update' %]
161
                        [% CASE 'success_on_update' %]
160
                            <span>List updated.</span>
162
                            <span>List updated.</span>
161
                        [% CASE 'success_on_insert' %]
163
                        [% CASE 'success_on_insert' %]
(-)a/opac/opac-shelves.pl (-4 / +8 lines)
Lines 272-281 if ( $op eq 'add_form' ) { Link Here
272
        my $patrons = [];
272
        my $patrons = [];
273
        my $shares = $shelf->get_shares->search({ borrowernumber => { '!=' => undef } });
273
        my $shares = $shelf->get_shares->search({ borrowernumber => { '!=' => undef } });
274
        while( my $share = $shares->next ) {
274
        while( my $share = $shares->next ) {
275
            push @$patrons, { email => $share->sharee->notice_email_address, borrowernumber => $share->get_column('borrowernumber') };
275
            my $email = $share->sharee->notice_email_address;
276
            push @$patrons, { email => $email, borrowernumber => $share->get_column('borrowernumber') } if $email;
277
        }
278
        if( @$patrons ) {
279
            $template->param( shared_users => $patrons );
280
            $op = 'transfer';
281
        } else {
282
            push @messages, { type => 'error', code => 'no_email_found' };
276
        }
283
        }
277
        $template->param( shared_users => $patrons );
278
        $op = 'transfer';
279
    } elsif( !Koha::Patrons->find($new_owner) ) {
284
    } elsif( !Koha::Patrons->find($new_owner) ) {
280
        push @messages, { type => 'error', code => 'new_owner_not_found' };
285
        push @messages, { type => 'error', code => 'new_owner_not_found' };
281
    } elsif( !$shelf->get_shares->search({ borrowernumber => $new_owner })->count ) {
286
    } elsif( !$shelf->get_shares->search({ borrowernumber => $new_owner })->count ) {
282
- 

Return to bug 25498