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(); |