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

(-)a/C4/Members/AttributeTypes.pm (-4 / +27 lines)
Lines 118-123 sub new { Link Here
118
    $self->{'opac_display'} = 0;
118
    $self->{'opac_display'} = 0;
119
    $self->{'password_allowed'} = 0;
119
    $self->{'password_allowed'} = 0;
120
    $self->{'staff_searchable'} = 0;
120
    $self->{'staff_searchable'} = 0;
121
    $self->{'display_checkout'} = 0;
121
    $self->{'authorised_value_category'} = '';
122
    $self->{'authorised_value_category'} = '';
122
123
123
    bless $self, $class;
124
    bless $self, $class;
Lines 152-157 sub fetch { Link Here
152
    $self->{'opac_display'}              = $row->{'opac_display'};
153
    $self->{'opac_display'}              = $row->{'opac_display'};
153
    $self->{'password_allowed'}          = $row->{'password_allowed'};
154
    $self->{'password_allowed'}          = $row->{'password_allowed'};
154
    $self->{'staff_searchable'}          = $row->{'staff_searchable'};
155
    $self->{'staff_searchable'}          = $row->{'staff_searchable'};
156
    $self->{'display_checkout'}          = $row->{'display_checkout'};
155
    $self->{'authorised_value_category'} = $row->{'authorised_value_category'};
157
    $self->{'authorised_value_category'} = $row->{'authorised_value_category'};
156
158
157
    bless $self, $class;
159
    bless $self, $class;
Lines 182-195 sub store { Link Here
182
                                         opac_display = ?,
184
                                         opac_display = ?,
183
                                         password_allowed = ?,
185
                                         password_allowed = ?,
184
                                         staff_searchable = ?,
186
                                         staff_searchable = ?,
185
                                         authorised_value_category = ?
187
                                         authorised_value_category = ?,
188
                                         display_checkout = ?
186
                                     WHERE code = ?");
189
                                     WHERE code = ?");
187
    } else {
190
    } else {
188
        $sth = $dbh->prepare_cached("INSERT INTO borrower_attribute_types 
191
        $sth = $dbh->prepare_cached("INSERT INTO borrower_attribute_types 
189
                                        (description, repeatable, unique_id, opac_display, password_allowed,
192
                                        (description, repeatable, unique_id, opac_display, password_allowed,
190
                                         staff_searchable, authorised_value_category, code)
193
                                         staff_searchable, authorised_value_category, display_checkout, code)
191
                                        VALUES (?, ?, ?, ?, ?,
194
                                        VALUES (?, ?, ?, ?, ?,
192
                                                ?, ?, ?)");
195
                                                ?, ?, ?, ?)");
193
    }
196
    }
194
    $sth->bind_param(1, $self->{'description'});
197
    $sth->bind_param(1, $self->{'description'});
195
    $sth->bind_param(2, $self->{'repeatable'});
198
    $sth->bind_param(2, $self->{'repeatable'});
Lines 198-204 sub store { Link Here
198
    $sth->bind_param(5, $self->{'password_allowed'});
201
    $sth->bind_param(5, $self->{'password_allowed'});
199
    $sth->bind_param(6, $self->{'staff_searchable'});
202
    $sth->bind_param(6, $self->{'staff_searchable'});
200
    $sth->bind_param(7, $self->{'authorised_value_category'});
203
    $sth->bind_param(7, $self->{'authorised_value_category'});
201
    $sth->bind_param(8, $self->{'code'});
204
    $sth->bind_param(8, $self->{'display_checkout'});
205
    $sth->bind_param(9, $self->{'code'});
202
    $sth->execute;
206
    $sth->execute;
203
207
204
}
208
}
Lines 304-309 sub staff_searchable { Link Here
304
    @_ ? $self->{'staff_searchable'} = ((shift) ? 1 : 0) : $self->{'staff_searchable'};
308
    @_ ? $self->{'staff_searchable'} = ((shift) ? 1 : 0) : $self->{'staff_searchable'};
305
}
309
}
306
310
311
=head2 display_checkout
312
313
=over 4
314
315
my $display_checkout = $attr_type->display_checkout();
316
$attr_type->display_checkout($display_checkout);
317
318
=back
319
320
Accessor.  The C<$display_checkout> argument
321
is interpreted as a Perl boolean.
322
323
=cut
324
325
sub display_checkout {
326
    my $self = shift;
327
    @_ ? $self->{'display_checkout'} = ((shift) ? 1 : 0) : $self->{'display_checkout'};
328
}
329
307
=head2 authorised_value_category
330
=head2 authorised_value_category
308
331
309
  my $authorised_value_category = $attr_type->authorised_value_category();
332
  my $authorised_value_category = $attr_type->authorised_value_category();
(-)a/C4/Members/Attributes.pm (-1 / +2 lines)
Lines 72-78 sub GetBorrowerAttributes { Link Here
72
    my $opac_only = @_ ? shift : 0;
72
    my $opac_only = @_ ? shift : 0;
73
73
74
    my $dbh = C4::Context->dbh();
74
    my $dbh = C4::Context->dbh();
75
    my $query = "SELECT code, description, attribute, lib, password
75
    my $query = "SELECT code, description, attribute, lib, password, display_checkout
76
                 FROM borrower_attributes
76
                 FROM borrower_attributes
77
                 JOIN borrower_attribute_types USING (code)
77
                 JOIN borrower_attribute_types USING (code)
78
                 LEFT JOIN authorised_values ON (category = authorised_value_category AND attribute = authorised_value)
78
                 LEFT JOIN authorised_values ON (category = authorised_value_category AND attribute = authorised_value)
Lines 89-94 sub GetBorrowerAttributes { Link Here
89
            value             => $row->{'attribute'},  
89
            value             => $row->{'attribute'},  
90
            value_description => $row->{'lib'},  
90
            value_description => $row->{'lib'},  
91
            password          => $row->{'password'},
91
            password          => $row->{'password'},
92
            display_checkout  => $row->{'display_checkout'},
92
        }
93
        }
93
    }
94
    }
94
    return \@results;
95
    return \@results;
(-)a/admin/patron-attr-types.pl (-1 / +8 lines)
Lines 106-111 sub error_add_attribute_type_form { Link Here
106
    if ($input->param('staff_searchable')) {
106
    if ($input->param('staff_searchable')) {
107
        $template->param(staff_searchable_checked => 'checked="checked"');
107
        $template->param(staff_searchable_checked => 'checked="checked"');
108
    }
108
    }
109
    if ($input->param('display_checkout')) {
110
        $template->param(display_checkout_checked => 'checked="checked"');
111
    }
109
112
110
    $template->param(
113
    $template->param(
111
        attribute_type_form => 1,
114
        attribute_type_form => 1,
Lines 147-152 sub add_update_attribute_type { Link Here
147
    $attr_type->authorised_value_category($authorised_value_category);
150
    $attr_type->authorised_value_category($authorised_value_category);
148
    my $password_allowed = $input->param('password_allowed');
151
    my $password_allowed = $input->param('password_allowed');
149
    $attr_type->password_allowed($password_allowed);
152
    $attr_type->password_allowed($password_allowed);
153
    my $display_checkout = $input->param('display_checkout');
154
    $attr_type->display_checkout($display_checkout);
150
155
151
    if ($op eq 'edit') {
156
    if ($op eq 'edit') {
152
        $template->param(edited_attribute_type => $attr_type->code());
157
        $template->param(edited_attribute_type => $attr_type->code());
Lines 222-228 sub edit_attribute_type_form { Link Here
222
    if ($attr_type->staff_searchable()) {
227
    if ($attr_type->staff_searchable()) {
223
        $template->param(staff_searchable_checked => 'checked="checked"');
228
        $template->param(staff_searchable_checked => 'checked="checked"');
224
    }
229
    }
225
230
    if ($attr_type->display_checkout()) {
231
        $template->param(display_checkout_checked => 'checked="checked"');
232
    }
226
    authorised_value_category_list($template, $attr_type->authorised_value_category());
233
    authorised_value_category_list($template, $attr_type->authorised_value_category());
227
234
228
    $template->param(
235
    $template->param(
(-)a/circ/circulation.pl (+3 lines)
Lines 35-40 use C4::Biblio; Link Here
35
use C4::Reserves;
35
use C4::Reserves;
36
use C4::Context;
36
use C4::Context;
37
use CGI::Session;
37
use CGI::Session;
38
use C4::Members::Attributes qw(GetBorrowerAttributes);
38
39
39
use Date::Calc qw(
40
use Date::Calc qw(
40
  Today
41
  Today
Lines 630-635 my $fast_cataloging = 0; Link Here
630
    if (defined getframeworkinfo('FA')) {
631
    if (defined getframeworkinfo('FA')) {
631
    $fast_cataloging = 1 
632
    $fast_cataloging = 1 
632
    }
633
    }
634
my $attributes = GetBorrowerAttributes($borrowernumber);
633
635
634
$template->param(
636
$template->param(
635
    lib_messages_loop => $lib_messages_loop,
637
    lib_messages_loop => $lib_messages_loop,
Lines 679-684 $template->param( Link Here
679
    circview => 1,
681
    circview => 1,
680
    soundon           => C4::Context->preference("SoundOn"),
682
    soundon           => C4::Context->preference("SoundOn"),
681
    fast_cataloging   => $fast_cataloging,
683
    fast_cataloging   => $fast_cataloging,
684
    extendedattributes => $attributes,
682
);
685
);
683
686
684
# save stickyduedate to session
687
# save stickyduedate to session
(-)a/installer/data/mysql/atomicupdate/0009-patron-attr-display-checkout.pl (+7 lines)
Line 0 Link Here
1
#! /usr/bin/perl
2
use strict;
3
use warnings;
4
use C4::Context;
5
my $dbh=C4::Context->dbh;
6
$dbh->do("ALTER TABLE borrower_attribute_types ADD COLUMN `display_checkout` TINYINT(1) NOT NULL DEFAULT '0';");
7
print "Upgrade done (Added a display_checkout field in borrower_attribute_types table)\n";
(-)a/installer/data/mysql/kohastructure.sql (+1 lines)
Lines 284-289 CREATE TABLE `borrower_attribute_types` ( Link Here
284
  `password_allowed` tinyint(1) NOT NULL default 0,
284
  `password_allowed` tinyint(1) NOT NULL default 0,
285
  `staff_searchable` tinyint(1) NOT NULL default 0,
285
  `staff_searchable` tinyint(1) NOT NULL default 0,
286
  `authorised_value_category` varchar(10) default NULL,
286
  `authorised_value_category` varchar(10) default NULL,
287
  `display_checkout` tinyint(1) NOT NULL default 0,
287
  PRIMARY KEY  (`code`),
288
  PRIMARY KEY  (`code`),
288
  KEY `auth_val_cat_idx` (`authorised_value_category`)
289
  KEY `auth_val_cat_idx` (`authorised_value_category`)
289
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
290
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc (+7 lines)
Lines 48-53 Link Here
48
            <li> <span class="empty">No email stored.</span>    </li>
48
            <li> <span class="empty">No email stored.</span>    </li>
49
        [% END %]
49
        [% END %]
50
    [% END %]
50
    [% END %]
51
    [% FOREACH extendedattribute IN extendedattributes %]
52
        [% IF ( extendedattribute.display_checkout ) %]
53
            [% IF ( extendedattribute.value ) %]
54
                <li>[% extendedattribute.description %] : [% IF ( extendedattribute.value_description ) %][% extendedattribute.value_description %][% ELSE %][% extendedattribute.value %][% END %]</li>
55
            [% END %]
56
        [% END %]
57
    [% END %]
51
    <li>Category: [% categoryname %] ([% categorycode %])</li>
58
    <li>Category: [% categoryname %] ([% categorycode %])</li>
52
    <li>Home Library: [% IF ( branchname ) %][% branchname %][% ELSE %][% branch %][% END %]</li>
59
    <li>Home Library: [% IF ( branchname ) %][% branchname %][% ELSE %][% branch %][% END %]</li>
53
</ul></div>
60
</ul></div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt (-1 / +6 lines)
Lines 68-74 function CheckAttributeTypeForm(f) { Link Here
68
    <div class="yui-b">
68
    <div class="yui-b">
69
69
70
[% IF ( WARNING_extended_attributes_off ) %]
70
[% IF ( WARNING_extended_attributes_off ) %]
71
<div class="dialog message">Because the 'ExtendedPatronAttributes` system preference is currently not enabled, extended patron attributes cannot be given to patron records.  Go <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ExtendedPatronAttributes">here</a> if you wish to enable this feature.</div>
71
<div class="dialog message">Because the 'ExtendedPatronAttributes` system preference is currently not enabled, extended patron attributes cannot be given to patron records.  Go <a href="/cgi-bin/koha/admin/preferences.pl?op=search&amp;searchfield=ExtendedPatronAttributes">here</a> if you wish to enable this feature.</div>
72
[% END %]
72
[% END %]
73
73
74
[% IF ( attribute_type_form ) %]
74
[% IF ( attribute_type_form ) %]
Lines 122-127 function CheckAttributeTypeForm(f) { Link Here
122
            <input type="checkbox" id="staff_searchable" name="staff_searchable" [% staff_searchable_checked %] />
122
            <input type="checkbox" id="staff_searchable" name="staff_searchable" [% staff_searchable_checked %] />
123
            <span>Check to make this attribute staff_searchable in the staff patron search.</span>
123
            <span>Check to make this attribute staff_searchable in the staff patron search.</span>
124
       </li>
124
       </li>
125
       <li><label for="display_checkout">Display in check-out: </label>
126
            <input type="checkbox" id="display_checkout" name="display_checkout" [% display_checkout_checked %] />
127
            <span>Check to show this attribute in patron check-out.</span>
128
       </li>
129
125
        <li><label for="authorised_value_category">Authorized value category: </label>
130
        <li><label for="authorised_value_category">Authorized value category: </label>
126
            <select name="authorised_value_category" id="authorised_value_category">
131
            <select name="authorised_value_category" id="authorised_value_category">
127
                <option value=""></option>
132
                <option value=""></option>
(-)a/members/boraccount.pl (-1 / +5 lines)
Lines 32-37 use CGI; Link Here
32
use C4::Members;
32
use C4::Members;
33
use C4::Branch;
33
use C4::Branch;
34
use C4::Accounts;
34
use C4::Accounts;
35
use C4::Members::Attributes qw(GetBorrowerAttributes);
35
36
36
my $input=new CGI;
37
my $input=new CGI;
37
38
Lines 96-101 $template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' ); Link Here
96
97
97
my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'});
98
my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'});
98
$template->param( picture => 1 ) if $picture;
99
$template->param( picture => 1 ) if $picture;
100
my $attributes = GetBorrowerAttributes($borrowernumber);
99
101
100
$template->param(
102
$template->param(
101
    finesview           => 1,
103
    finesview           => 1,
Lines 120-125 $template->param( Link Here
120
    totalcredit         => $totalcredit,
122
    totalcredit         => $totalcredit,
121
    is_child            => ($data->{'category_type'} eq 'C'),
123
    is_child            => ($data->{'category_type'} eq 'C'),
122
    reverse_col         => $reverse_col,
124
    reverse_col         => $reverse_col,
123
    accounts            => $accts );
125
    accounts            => $accts,
126
    extendedattributes => $attributes,
127
);
124
128
125
output_html_with_http_headers $input, $cookie, $template->output;
129
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/members/mancredit.pl (+3 lines)
Lines 33-38 use C4::Members; Link Here
33
use C4::Branch;
33
use C4::Branch;
34
use C4::Accounts;
34
use C4::Accounts;
35
use C4::Items;
35
use C4::Items;
36
use C4::Members::Attributes qw(GetBorrowerAttributes);
36
37
37
my $input=new CGI;
38
my $input=new CGI;
38
39
Lines 77-82 if ($add){ Link Here
77
    $template->param( adultborrower => 1 ) if ( $data->{category_type} eq 'A' );
78
    $template->param( adultborrower => 1 ) if ( $data->{category_type} eq 'A' );
78
    my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'});
79
    my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'});
79
    $template->param( picture => 1 ) if $picture;
80
    $template->param( picture => 1 ) if $picture;
81
    my $attributes = GetBorrowerAttributes($borrowernumber);
80
    
82
    
81
    $template->param(
83
    $template->param(
82
        borrowernumber => $borrowernumber,
84
        borrowernumber => $borrowernumber,
Lines 97-102 if ($add){ Link Here
97
		    branchcode => $data->{'branchcode'},
99
		    branchcode => $data->{'branchcode'},
98
		    branchname => GetBranchName($data->{'branchcode'}),
100
		    branchname => GetBranchName($data->{'branchcode'}),
99
		    is_child        => ($data->{'category_type'} eq 'C'),
101
		    is_child        => ($data->{'category_type'} eq 'C'),
102
            extendedattributes => $attributes,
100
        );
103
        );
101
    output_html_with_http_headers $input, $cookie, $template->output;
104
    output_html_with_http_headers $input, $cookie, $template->output;
102
}
105
}
(-)a/members/maninvoice.pl (+3 lines)
Lines 32-37 use C4::Members; Link Here
32
use C4::Accounts;
32
use C4::Accounts;
33
use C4::Items;
33
use C4::Items;
34
use C4::Branch;
34
use C4::Branch;
35
use C4::Members::Attributes qw(GetBorrowerAttributes);
35
36
36
my $input=new CGI;
37
my $input=new CGI;
37
38
Lines 105-110 if ($add){ Link Here
105
    $template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' );
106
    $template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' );
106
    my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'});
107
    my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'});
107
    $template->param( picture => 1 ) if $picture;
108
    $template->param( picture => 1 ) if $picture;
109
    my $attributes = GetBorrowerAttributes($borrowernumber);
108
110
109
	$template->param(
111
	$template->param(
110
                borrowernumber => $borrowernumber,
112
                borrowernumber => $borrowernumber,
Lines 125-130 if ($add){ Link Here
125
		branchcode => $data->{'branchcode'},
127
		branchcode => $data->{'branchcode'},
126
		branchname => GetBranchName($data->{'branchcode'}),
128
		branchname => GetBranchName($data->{'branchcode'}),
127
		is_child        => ($data->{'category_type'} eq 'C'),
129
		is_child        => ($data->{'category_type'} eq 'C'),
130
        extendedattributes => $attributes,
128
    );
131
    );
129
    output_html_with_http_headers $input, $cookie, $template->output;
132
    output_html_with_http_headers $input, $cookie, $template->output;
130
}
133
}
(-)a/members/member-flags.pl (-1 / +4 lines)
Lines 13-18 use C4::Auth qw(:DEFAULT :EditPermissions); Link Here
13
use C4::Context;
13
use C4::Context;
14
use C4::Members;
14
use C4::Members;
15
use C4::Branch;
15
use C4::Branch;
16
use C4::Members::Attributes qw(GetBorrowerAttributes);
16
#use C4::Acquisitions;
17
#use C4::Acquisitions;
17
18
18
use C4::Output;
19
use C4::Output;
Lines 161-167 if ($input->param('newflags')) { Link Here
161
$template->param( adultborrower => 1 ) if ( $bor->{'category_type'} eq 'A' );
162
$template->param( adultborrower => 1 ) if ( $bor->{'category_type'} eq 'A' );
162
    my ($picture, $dberror) = GetPatronImage($bor->{'cardnumber'});
163
    my ($picture, $dberror) = GetPatronImage($bor->{'cardnumber'});
163
    $template->param( picture => 1 ) if $picture;
164
    $template->param( picture => 1 ) if $picture;
164
		
165
my $attributes = GetBorrowerAttributes($bor->{'borrowernumber'});
166
165
$template->param(
167
$template->param(
166
		borrowernumber => $bor->{'borrowernumber'},
168
		borrowernumber => $bor->{'borrowernumber'},
167
    cardnumber => $bor->{'cardnumber'},
169
    cardnumber => $bor->{'cardnumber'},
Lines 182-187 $template->param( Link Here
182
		branchname => GetBranchName($bor->{'branchcode'}),
184
		branchname => GetBranchName($bor->{'branchcode'}),
183
		loop => \@loop,
185
		loop => \@loop,
184
		is_child        => ($bor->{'category_type'} eq 'C'),
186
		is_child        => ($bor->{'category_type'} eq 'C'),
187
        extendedattributes => $attributes,
185
		);
188
		);
186
189
187
    output_html_with_http_headers $input, $cookie, $template->output;
190
    output_html_with_http_headers $input, $cookie, $template->output;
(-)a/members/member-password.pl (-2 / +5 lines)
Lines 14-19 use C4::Members; Link Here
14
use C4::Branch;
14
use C4::Branch;
15
use C4::Circulation;
15
use C4::Circulation;
16
use CGI;
16
use CGI;
17
use C4::Members::Attributes qw(GetBorrowerAttributes);
17
18
18
use Digest::MD5 qw(md5_base64);
19
use Digest::MD5 qw(md5_base64);
19
20
Lines 89-95 if ( $newpassword && ! $errormsg ) { Link Here
89
$template->param( adultborrower => 1 ) if ( $bor->{'category_type'} eq 'A' );
90
$template->param( adultborrower => 1 ) if ( $bor->{'category_type'} eq 'A' );
90
my ($picture, $dberror) = GetPatronImage($bor->{'cardnumber'});
91
my ($picture, $dberror) = GetPatronImage($bor->{'cardnumber'});
91
$template->param( picture => 1 ) if $picture;
92
$template->param( picture => 1 ) if $picture;
92
	
93
my $attributes = GetBorrowerAttributes($bor->{'borrowernumber'});
94
93
    $template->param( othernames => $bor->{'othernames'},
95
    $template->param( othernames => $bor->{'othernames'},
94
	    surname     => $bor->{'surname'},
96
	    surname     => $bor->{'surname'},
95
	    firstname   => $bor->{'firstname'},
97
	    firstname   => $bor->{'firstname'},
Lines 111-117 $template->param( picture => 1 ) if $picture; Link Here
111
	    userid      => $bor->{'userid'},
113
	    userid      => $bor->{'userid'},
112
	    destination => $destination,
114
	    destination => $destination,
113
		is_child        => ($bor->{'category_type'} eq 'C'),
115
		is_child        => ($bor->{'category_type'} eq 'C'),
114
	    defaultnewpassword => $defaultnewpassword 
116
	    defaultnewpassword => $defaultnewpassword,
117
    	extendedattributes => $attributes,
115
	);
118
	);
116
119
117
120
(-)a/members/messaging.pl (+3 lines)
Lines 35-40 use C4::Letters; Link Here
35
use C4::Biblio;
35
use C4::Biblio;
36
use C4::Reserves;
36
use C4::Reserves;
37
use C4::Branch; # GetBranchName
37
use C4::Branch; # GetBranchName
38
use C4::Members::Attributes qw(GetBorrowerAttributes);
38
39
39
use Data::Dumper;
40
use Data::Dumper;
40
41
Lines 79-84 $template->param( picture => 1 ) if $picture; Link Here
79
80
80
# get some recent messages sent to this borrower for display:
81
# get some recent messages sent to this borrower for display:
81
my $message_queue = C4::Letters::GetQueuedMessages( { borrowernumber => $query->param('borrowernumber') } );
82
my $message_queue = C4::Letters::GetQueuedMessages( { borrowernumber => $query->param('borrowernumber') } );
83
my $attributes = GetBorrowerAttributes($borrowernumber);
82
84
83
$template->param( messagingview               => 1,
85
$template->param( messagingview               => 1,
84
                  message_queue               => $message_queue,
86
                  message_queue               => $message_queue,
Lines 88-93 $template->param( messagingview => 1, Link Here
88
                  dateformat                  => C4::Context->preference("dateformat"),
90
                  dateformat                  => C4::Context->preference("dateformat"),
89
                  categoryname                => $borrower->{'description'},
91
                  categoryname                => $borrower->{'description'},
90
                  $borrower->{'categorycode'} => 1,
92
                  $borrower->{'categorycode'} => 1,
93
                  extendedattributes => $attributes,
91
);
94
);
92
95
93
#$messaging_preferences->{'SMSnumber'}{'value'} = defined $borrower->{'smsalertnumber'}
96
#$messaging_preferences->{'SMSnumber'}{'value'} = defined $borrower->{'smsalertnumber'}
(-)a/members/moremember.pl (+3 lines)
Lines 52-57 use C4::Branch; # GetBranchName Link Here
52
use C4::Form::MessagingPreferences;
52
use C4::Form::MessagingPreferences;
53
use C4::NewsChannels; #get slip news
53
use C4::NewsChannels; #get slip news
54
use List::MoreUtils qw/uniq/;
54
use List::MoreUtils qw/uniq/;
55
use C4::Members::Attributes qw(GetBorrowerAttributes);
55
56
56
#use Smart::Comments;
57
#use Smart::Comments;
57
#use Data::Dumper;
58
#use Data::Dumper;
Lines 438-443 if (C4::Context->preference('EnhancedMessagingPreferences')) { Link Here
438
    $template->param(SMSSendDriver => C4::Context->preference("SMSSendDriver"));
439
    $template->param(SMSSendDriver => C4::Context->preference("SMSSendDriver"));
439
    $template->param(SMSnumber     => defined $data->{'smsalertnumber'} ? $data->{'smsalertnumber'} : $data->{'mobile'});
440
    $template->param(SMSnumber     => defined $data->{'smsalertnumber'} ? $data->{'smsalertnumber'} : $data->{'mobile'});
440
}
441
}
442
my $attributes = GetBorrowerAttributes($borrowernumber);
441
443
442
$template->param(
444
$template->param(
443
    detailview => 1,
445
    detailview => 1,
Lines 467-472 $template->param( Link Here
467
    "dateformat_" . (C4::Context->preference("dateformat") || '') => 1,
469
    "dateformat_" . (C4::Context->preference("dateformat") || '') => 1,
468
    samebranch     => $samebranch,
470
    samebranch     => $samebranch,
469
    quickslip		  => $quickslip,
471
    quickslip		  => $quickslip,
472
    extendedattributes => $attributes,
470
);
473
);
471
474
472
#Get the slip news items
475
#Get the slip news items
(-)a/members/notices.pl (-1 / +4 lines)
Lines 27-32 use CGI; Link Here
27
use C4::Members;
27
use C4::Members;
28
use C4::Branch;
28
use C4::Branch;
29
use C4::Letters;
29
use C4::Letters;
30
use C4::Members::Attributes qw(GetBorrowerAttributes);
30
31
31
use C4::Dates qw/format_date/;
32
use C4::Dates qw/format_date/;
32
my $input=new CGI;
33
my $input=new CGI;
Lines 52-62 $template->param( picture => 1 ) if $picture; Link Here
52
# Getting the messages
53
# Getting the messages
53
my $queued_messages = C4::Letters::GetQueuedMessages({borrowernumber => $borrowernumber});
54
my $queued_messages = C4::Letters::GetQueuedMessages({borrowernumber => $borrowernumber});
54
$template->param( %{$borrower} );
55
$template->param( %{$borrower} );
56
my $attributes = GetBorrowerAttributes($borrowernumber);
55
57
56
$template->param(
58
$template->param(
57
			QUEUED_MESSAGES 	=> $queued_messages,
59
			QUEUED_MESSAGES 	=> $queued_messages,
58
			borrowernumber 		=> $borrowernumber,
60
			borrowernumber 		=> $borrowernumber,
59
			sentnotices 		=> 1
61
			sentnotices 		=> 1,
62
		    extendedattributes => $attributes,
60
		);
63
		);
61
output_html_with_http_headers $input, $cookie, $template->output;
64
output_html_with_http_headers $input, $cookie, $template->output;
62
65
(-)a/members/pay.pl (-1 / +4 lines)
Lines 39-44 use C4::Stats; Link Here
39
use C4::Koha;
39
use C4::Koha;
40
use C4::Overdues;
40
use C4::Overdues;
41
use C4::Branch; # GetBranches
41
use C4::Branch; # GetBranches
42
use C4::Members::Attributes qw(GetBorrowerAttributes);
42
43
43
my $input = new CGI;
44
my $input = new CGI;
44
45
Lines 152-157 if ( $data->{'category_type'} eq 'C') { Link Here
152
$template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' );
153
$template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' );
153
my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'});
154
my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'});
154
$template->param( picture => 1 ) if $picture;
155
$template->param( picture => 1 ) if $picture;
156
my $attributes = GetBorrowerAttributes($borrowernumber);
155
	
157
	
156
    $template->param(
158
    $template->param(
157
        allfile        => \@allfile,
159
        allfile        => \@allfile,
Lines 173-179 $template->param( picture => 1 ) if $picture; Link Here
173
	branchcode => $data->{'branchcode'},
175
	branchcode => $data->{'branchcode'},
174
	branchname => GetBranchName($data->{'branchcode'}),
176
	branchname => GetBranchName($data->{'branchcode'}),
175
	is_child        => ($data->{'category_type'} eq 'C'),
177
	is_child        => ($data->{'category_type'} eq 'C'),
176
        total          => sprintf( "%.2f", $total )
178
        total          => sprintf( "%.2f", $total ),
179
    extendedattributes => $attributes,
177
    );
180
    );
178
    output_html_with_http_headers $input, $cookie, $template->output;
181
    output_html_with_http_headers $input, $cookie, $template->output;
179
182
(-)a/members/readingrec.pl (-2 / +5 lines)
Lines 32-37 use C4::Branch; Link Here
32
use List::MoreUtils qw/any/;
32
use List::MoreUtils qw/any/;
33
33
34
use C4::Dates qw/format_date/;
34
use C4::Dates qw/format_date/;
35
use C4::Members::Attributes qw(GetBorrowerAttributes);
35
36
36
my $input = CGI->new;
37
my $input = CGI->new;
37
38
Lines 95-100 if (! $limit){ Link Here
95
96
96
my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'});
97
my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'});
97
$template->param( picture => 1 ) if $picture;
98
$template->param( picture => 1 ) if $picture;
99
my $attributes = GetBorrowerAttributes($borrowernumber);
98
100
99
$template->param(
101
$template->param(
100
						readingrecordview => 1,
102
						readingrecordview => 1,
Lines 122-128 $template->param( Link Here
122
			   			is_child        => ($data->{'category_type'} eq 'C'),
124
			   			is_child        => ($data->{'category_type'} eq 'C'),
123
			   			branchname => GetBranchName($data->{'branchcode'}),
125
			   			branchname => GetBranchName($data->{'branchcode'}),
124
						showfulllink => (scalar @loop_reading > 50),					
126
						showfulllink => (scalar @loop_reading > 50),					
125
						loop_reading => \@loop_reading);
127
						loop_reading => \@loop_reading,
128
					    extendedattributes => $attributes,
129
);
126
output_html_with_http_headers $input, $cookie, $template->output;
130
output_html_with_http_headers $input, $cookie, $template->output;
127
131
128
132
129
- 

Return to bug 5436