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

(-)a/C4/Members/AttributeTypes.pm (-16 / +27 lines)
Lines 215-237 sub store { Link Here
215
                                     WHERE code = ?");
215
                                     WHERE code = ?");
216
    } else {
216
    } else {
217
        $sth = $dbh->prepare_cached("INSERT INTO borrower_attribute_types 
217
        $sth = $dbh->prepare_cached("INSERT INTO borrower_attribute_types 
218
                                        (description, repeatable, unique_id, opac_display, opac_editable,
218
                                        ( description,
219
                                         staff_searchable, authorised_value_category, display_checkout, category_code, class, code)
219
                                          repeatable,
220
                                        VALUES (?, ?, ?, ?, ?,
220
                                          unique_id,
221
                                                ?, ?, ?, ?, ?, ?)");
221
                                          opac_display,
222
                                          opac_editable,
223
                                          staff_searchable,
224
                                          authorised_value_category,
225
                                          display_checkout,
226
                                          category_code,
227
                                          class,
228
                                          code
229
                                        )
230
                                        VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
222
    }
231
    }
223
    $sth->bind_param(1, $self->{'description'});
232
224
    $sth->bind_param(2, $self->{'repeatable'});
233
    $sth->execute(
225
    $sth->bind_param(3, $self->{'unique_id'});
234
        $self->{'description'},
226
    $sth->bind_param(4, $self->{'opac_display'});
235
        $self->{'repeatable'},
227
    $sth->bind_param(5, $self->{'opac_editable'});
236
        $self->{'unique_id'},
228
    $sth->bind_param(7, $self->{'staff_searchable'});
237
        $self->{'opac_display'},
229
    $sth->bind_param(8, $self->{'authorised_value_category'});
238
        $self->{'opac_editable'},
230
    $sth->bind_param(9, $self->{'display_checkout'});
239
        $self->{'staff_searchable'} || 0,
231
    $sth->bind_param(10, $self->{'category_code'} || undef);
240
        $self->{'authorised_value_category'},
232
    $sth->bind_param(11, $self->{'class'});
241
        $self->{'display_checkout'},
233
    $sth->bind_param(12, $self->{'code'});
242
        $self->{'category_code'} || undef,
234
    $sth->execute;
243
        $self->{'class'},
244
        $self->{'code'}
245
    );
235
246
236
    if ( defined $$self{branches} ) {
247
    if ( defined $$self{branches} ) {
237
        $sth = $dbh->prepare("DELETE FROM borrower_attribute_types_branches WHERE bat_code = ?");
248
        $sth = $dbh->prepare("DELETE FROM borrower_attribute_types_branches WHERE bat_code = ?");
(-)a/admin/patron-attr-types.pl (-9 / +10 lines)
Lines 36-53 use Koha::Patron::Categories; Link Here
36
36
37
my $script_name = "/cgi-bin/koha/admin/patron-attr-types.pl";
37
my $script_name = "/cgi-bin/koha/admin/patron-attr-types.pl";
38
38
39
our $input = new CGI;
39
my $input = new CGI;
40
my $op = $input->param('op') || '';
40
my $op = $input->param('op') || '';
41
41
42
42
43
our ($template, $loggedinuser, $cookie)
43
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
44
    = get_template_and_user({template_name => "admin/patron-attr-types.tt",
44
    {   template_name   => "admin/patron-attr-types.tt",
45
                 query => $input,
45
        query           => $input,
46
                 type => "intranet",
46
        type            => "intranet",
47
                 authnotrequired => 0,
47
        authnotrequired => 0,
48
                 flagsrequired => {parameters => 'parameters_remaining_permissions'},
48
        flagsrequired => { parameters => 'parameters_remaining_permissions' }
49
                 debug => 1,
49
    }
50
                 });
50
);
51
51
52
52
$template->param(script_name => $script_name);
53
$template->param(script_name => $script_name);
53
54
(-)a/opac/opac-memberentry.pl (-3 / +3 lines)
Lines 23-29 use List::MoreUtils qw( each_array uniq ); Link Here
23
use String::Random qw( random_string );
23
use String::Random qw( random_string );
24
24
25
use C4::Auth;
25
use C4::Auth;
26
use C4::Koha qw( GetAuthorisedValueByCode );
27
use C4::Output;
26
use C4::Output;
28
use C4::Members;
27
use C4::Members;
29
use C4::Form::MessagingPreferences;
28
use C4::Form::MessagingPreferences;
Lines 513-519 sub GeneratePatronAttributesForm { Link Here
513
    foreach my $class (@classes) {
512
    foreach my $class (@classes) {
514
        next unless ( $items_by_class{$class} );
513
        next unless ( $items_by_class{$class} );
515
514
516
        my $lib = GetAuthorisedValueByCode( 'PA_CLASS', $class, 1 ) || $class;
515
        my $av = Koha::AuthorisedValues->search({ category => 'PA_CLASS', authorised_value => $class });
516
        my $lib = $av->count ? $av->next->opac_description : $class;
517
517
        push @class_loop, {
518
        push @class_loop, {
518
            class => $class,
519
            class => $class,
519
            items => $items_by_class{$class},
520
            items => $items_by_class{$class},
520
- 

Return to bug 13757