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

(-)a/members/files.pl (-2 / +5 lines)
Lines 64-69 if ( $op eq 'download' ) { Link Here
64
}
64
}
65
else {
65
else {
66
    my $patron = Koha::Patrons->find( $borrowernumber );
66
    my $patron = Koha::Patrons->find( $borrowernumber );
67
    my $patron_category = $patron->category;
67
    $template->param(%{ $patron->unblessed});
68
    $template->param(%{ $patron->unblessed});
68
69
69
    my %errors;
70
    my %errors;
Lines 102-108 else { Link Here
102
    }
103
    }
103
104
104
    $template->param(
105
    $template->param(
105
        categoryname    => $patron->category->description,
106
        categoryname    => $patron_category->description,
106
        RoutingSerials => C4::Context->preference('RoutingSerials'),
107
        RoutingSerials => C4::Context->preference('RoutingSerials'),
107
    );
108
    );
108
109
Lines 116-122 else { Link Here
116
117
117
    $template->param( picture => 1 ) if $patron->image;
118
    $template->param( picture => 1 ) if $patron->image;
118
119
119
    $template->param( adultborrower => 1 ) if ( $data->{category_type} eq 'A' || $data->{category_type} eq 'I' );
120
    $template->param( adultborrower => 1 )
121
        if ( $patron_category->category_type eq 'A' || $patron_category->category_type eq 'I' );
122
120
    $template->param(
123
    $template->param(
121
        files => Koha::Patron::Files->new( borrowernumber => $borrowernumber )
124
        files => Koha::Patron::Files->new( borrowernumber => $borrowernumber )
122
          ->GetFilesInfo(),
125
          ->GetFilesInfo(),
(-)a/members/member-flags.pl (-37 / +38 lines)
Lines 30-36 my $patron = Koha::Patrons->find( $member ); Link Here
30
my $category_type = $patron->category->category_type;
30
my $category_type = $patron->category->category_type;
31
my $bor = $patron->unblessed;
31
my $bor = $patron->unblessed;
32
if( $category_type eq 'S' )  {
32
if( $category_type eq 'S' )  {
33
	$flagsrequired->{'staffaccess'} = 1;
33
    $flagsrequired->{'staffaccess'} = 1;
34
}
34
}
35
my ($template, $loggedinuser, $cookie) = get_template_and_user({
35
my ($template, $loggedinuser, $cookie) = get_template_and_user({
36
        template_name   => "members/member-flags.tt",
36
        template_name   => "members/member-flags.tt",
Lines 117-130 if ($input->param('newflags')) { Link Here
117
    my @loop;
117
    my @loop;
118
118
119
    while (my ($bit, $flag) = $sth->fetchrow) {
119
    while (my ($bit, $flag) = $sth->fetchrow) {
120
	    my $checked='';
120
        my $checked='';
121
	    if ($accessflags->{$flag}) {
121
        if ($accessflags->{$flag}) {
122
	        $checked= 1;
122
            $checked= 1;
123
	    }
123
        }
124
124
125
	    my %row = ( bit => $bit,
125
        my %row = ( bit => $bit,
126
		    flag => $flag,
126
            flag => $flag,
127
		    checked => $checked,
127
            checked => $checked,
128
        );
128
        );
129
129
130
        my @sub_perm_loop = ();
130
        my @sub_perm_loop = ();
Lines 170-176 if ($input->param('newflags')) { Link Here
170
        if ($#sub_perm_loop > -1) {
170
        if ($#sub_perm_loop > -1) {
171
            $row{sub_perm_loop} = \@sub_perm_loop;
171
            $row{sub_perm_loop} = \@sub_perm_loop;
172
        }
172
        }
173
	    push @loop, \%row;
173
        push @loop, \%row;
174
    }
174
    }
175
175
176
    if ( $category_type eq 'C') {
176
    if ( $category_type eq 'C') {
Lines 178-184 if ($input->param('newflags')) { Link Here
178
        $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
178
        $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
179
        $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
179
        $template->param( 'catcode' => $patron_categories->next )  if $patron_categories->count == 1;
180
    }
180
    }
181
	
181
182
$template->param( adultborrower => 1 ) if ( $category_type =~ /^(A|I)$/ );
182
$template->param( adultborrower => 1 ) if ( $category_type =~ /^(A|I)$/ );
183
    $template->param( picture => 1 ) if $patron->image;
183
    $template->param( picture => 1 ) if $patron->image;
184
184
Lines 191-222 if (C4::Context->preference('ExtendedPatronAttributes')) { Link Here
191
}
191
}
192
192
193
$template->param(
193
$template->param(
194
		borrowernumber => $bor->{'borrowernumber'},
194
    borrowernumber => $bor->{'borrowernumber'},
195
    cardnumber => $bor->{'cardnumber'},
195
    cardnumber     => $bor->{'cardnumber'},
196
		surname => $bor->{'surname'},
196
    surname        => $bor->{'surname'},
197
		firstname => $bor->{'firstname'},
197
    firstname      => $bor->{'firstname'},
198
        othernames => $bor->{'othernames'},
198
    othernames     => $bor->{'othernames'},
199
		categorycode => $bor->{'categorycode'},
199
    categorycode   => $bor->{'categorycode'},
200
		category_type => $category_type,
200
    category_type  => $category_type,
201
		categoryname => $bor->{'description'},
201
    categoryname   => $bor->{'description'},
202
        address => $bor->{address},
202
    address        => $bor->{address},
203
		address2 => $bor->{'address2'},
203
    address2       => $bor->{'address2'},
204
        streettype => $bor->{streettype},
204
    streettype     => $bor->{streettype},
205
		city => $bor->{'city'},
205
    city           => $bor->{'city'},
206
        state => $bor->{'state'},
206
    state          => $bor->{'state'},
207
		zipcode => $bor->{'zipcode'},
207
    zipcode        => $bor->{'zipcode'},
208
		country => $bor->{'country'},
208
    country        => $bor->{'country'},
209
		phone => $bor->{'phone'},
209
    phone          => $bor->{'phone'},
210
        phonepro => $bor->{'phonepro'},
210
    phonepro       => $bor->{'phonepro'},
211
        mobile => $bor->{'mobile'},
211
    mobile         => $bor->{'mobile'},
212
		email => $bor->{'email'},
212
    email          => $bor->{'email'},
213
        emailpro => $bor->{'emailpro'},
213
    emailpro       => $bor->{'emailpro'},
214
		branchcode => $bor->{'branchcode'},
214
    branchcode     => $bor->{'branchcode'},
215
		loop => \@loop,
215
    loop           => \@loop,
216
		is_child        => ($category_type eq 'C'),
216
    is_child       => ( $category_type eq 'C' ),
217
        RoutingSerials => C4::Context->preference('RoutingSerials'),
217
    RoutingSerials => C4::Context->preference('RoutingSerials'),
218
        csrf_token => Koha::Token->new->generate_csrf( { session_id => scalar $input->cookie('CGISESSID'), } ),
218
    csrf_token =>
219
		);
219
        Koha::Token->new->generate_csrf( { session_id => scalar $input->cookie('CGISESSID'), } ),
220
);
220
221
221
    output_html_with_http_headers $input, $cookie, $template->output;
222
    output_html_with_http_headers $input, $cookie, $template->output;
222
223
(-)a/opac/opac-passwd.pl (-5 / +6 lines)
Lines 104-115 if ( C4::Context->preference("OpacPasswordChange") ) { Link Here
104
        }
104
        }
105
    }
105
    }
106
}
106
}
107
$template->param(firstname => $patron->firstname,
107
$template->param(
108
							surname => $patron->surname,
108
    firstname  => $patron->firstname,
109
							minpasslen => $minpasslen,
109
    surname    => $patron->surname,
110
							passwdview => 1,
110
    minpasslen => $minpasslen,
111
    passwdview => 1
111
);
112
);
112
113
114
113
output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
115
output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
114
116
115
sub goodkey {
117
sub goodkey {
116
- 

Return to bug 17829