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

(-)a/C4/Members.pm (-1 / +1 lines)
Lines 977-983 sub GetFirstValidEmailAddress { Link Here
977
977
978
    my $borrower = Koha::Patrons->find( $borrowernumber );
978
    my $borrower = Koha::Patrons->find( $borrowernumber );
979
979
980
    return $borrower->FirstValidEmailAddress();
980
    return $borrower->first_valid_email_address();
981
}
981
}
982
982
983
=head2 GetNoticeEmailAddress
983
=head2 GetNoticeEmailAddress
(-)a/Koha/Patron.pm (-4 / +4 lines)
Lines 585-598 sub holds { Link Here
585
    return Koha::Holds->_new_from_dbic($holds_rs);
585
    return Koha::Holds->_new_from_dbic($holds_rs);
586
}
586
}
587
587
588
=head3 FirstValidEmailAddress
588
=head3 first_valid_email_address
589
589
590
=cut
590
=cut
591
591
592
sub FirstValidEmailAddress {
592
sub first_valid_email_address {
593
    my ($self) = @_;
593
    my ($self) = @_;
594
594
595
    return $self->email() || $self->emailpro() || $self->b_email() || q{};
595
    return $self->email() || $self->emailpro() || $self->B_email() || q{};
596
}
596
}
597
597
598
=head3 get_club_enrollments
598
=head3 get_club_enrollments
Lines 627-633 sub get_enrollable_clubs { Link Here
627
    my $params;
627
    my $params;
628
    $params->{is_enrollable_from_opac} = $is_enrollable_from_opac
628
    $params->{is_enrollable_from_opac} = $is_enrollable_from_opac
629
      if $is_enrollable_from_opac;
629
      if $is_enrollable_from_opac;
630
    $params->{is_email_required} = 0 unless $self->FirstValidEmailAddress();
630
    $params->{is_email_required} = 0 unless $self->first_valid_email_address();
631
631
632
    $params->{borrower} = $self;
632
    $params->{borrower} = $self;
633
633
(-)a/circ/circulation.pl (-8 / +4 lines)
Lines 24-36 Link Here
24
24
25
use strict;
25
use strict;
26
use warnings;
26
use warnings;
27
28
use CGI qw ( -utf8 );
27
use CGI qw ( -utf8 );
29
use DateTime;
28
use DateTime;
30
use DateTime::Duration;
29
use DateTime::Duration;
31
use MARC::Record;
32
use CGI::Session;
33
34
use C4::Output;
30
use C4::Output;
35
use C4::Print;
31
use C4::Print;
36
use C4::Auth qw/:DEFAULT get_session haspermission/;
32
use C4::Auth qw/:DEFAULT get_session haspermission/;
Lines 40-60 use C4::Utils::DataTables::Members; Link Here
40
use C4::Members;
36
use C4::Members;
41
use C4::Biblio;
37
use C4::Biblio;
42
use C4::Search;
38
use C4::Search;
39
use MARC::Record;
43
use C4::Reserves;
40
use C4::Reserves;
41
use Koha::Holds;
44
use C4::Context;
42
use C4::Context;
43
use CGI::Session;
45
use C4::Members::Attributes qw(GetBorrowerAttributes);
44
use C4::Members::Attributes qw(GetBorrowerAttributes);
46
use Koha::AuthorisedValues;
45
use Koha::AuthorisedValues;
46
use Koha::Patron;
47
use Koha::Patron::Debarments qw(GetDebarments);
47
use Koha::Patron::Debarments qw(GetDebarments);
48
use Koha::DateUtils;
48
use Koha::DateUtils;
49
use Koha::Database;
49
use Koha::Database;
50
use Koha::BiblioFrameworks;
50
use Koha::BiblioFrameworks;
51
use Koha::Patrons;
52
use Koha::Patron::Messages;
51
use Koha::Patron::Messages;
53
use Koha::Patron::Images;
52
use Koha::Patron::Images;
54
use Koha::SearchEngine;
53
use Koha::SearchEngine;
55
use Koha::SearchEngine::Search;
54
use Koha::SearchEngine::Search;
56
use Koha::Patron::Modifications;
55
use Koha::Patron::Modifications;
57
use Koha::Holds;
58
56
59
use Date::Calc qw(
57
use Date::Calc qw(
60
  Today
58
  Today
Lines 649-655 my $patron_image = Koha::Patron::Images->find($borrower->{borrowernumber}); Link Here
649
$template->param( picture => 1 ) if $patron_image;
647
$template->param( picture => 1 ) if $patron_image;
650
648
651
my $has_modifications = Koha::Patron::Modifications->search( { borrowernumber => $borrowernumber } )->count;
649
my $has_modifications = Koha::Patron::Modifications->search( { borrowernumber => $borrowernumber } )->count;
652
653
$template->param(
650
$template->param(
654
    debt_confirmed            => $debt_confirmed,
651
    debt_confirmed            => $debt_confirmed,
655
    SpecifyDueDate            => $duedatespec_allow,
652
    SpecifyDueDate            => $duedatespec_allow,
Lines 659-665 $template->param( Link Here
659
    has_modifications         => $has_modifications,
656
    has_modifications         => $has_modifications,
660
    override_high_holds       => $override_high_holds,
657
    override_high_holds       => $override_high_holds,
661
    nopermission              => scalar $query->param('nopermission'),
658
    nopermission              => scalar $query->param('nopermission'),
662
    borrower                  => Koha::Patrons->find( $borrowernumber ),
663
);
659
);
664
660
665
output_html_with_http_headers $query, $cookie, $template->output;
661
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-3 / +2 lines)
Lines 898-905 No patron matched <span class="ex">[% message | html %]</span> Link Here
898
        [% END %]
898
        [% END %]
899
    </li>
899
    </li>
900
900
901
    [% SET enrollments = borrower.get_club_enrollments_count %]
901
    [% SET enrollments = patron.get_club_enrollments_count %]
902
    [% SET enrollable  = borrower.get_enrollable_clubs_count %]
902
    [% SET enrollable  = patron.get_enrollable_clubs_count %]
903
    [% IF CAN_user_clubs && ( enrollable || enrollments ) %]
903
    [% IF CAN_user_clubs && ( enrollable || enrollments ) %]
904
        <li>
904
        <li>
905
            <a id="clubs-tab-link" href="#clubs-tab">
905
            <a id="clubs-tab-link" href="#clubs-tab">
906
- 

Return to bug 12461