Bugzilla – Attachment 57045 Details for
Bug 13757
Make patron attributes editable in the opac if set to 'editable in OPAC'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13757: (followup) Rebase against master
Bug-13757-followup-Rebase-against-master.patch (text/plain), 4.93 KB, created by
Tomás Cohen Arazi (tcohen)
on 2016-11-01 15:30:45 UTC
(
hide
)
Description:
Bug 13757: (followup) Rebase against master
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2016-11-01 15:30:45 UTC
Size:
4.93 KB
patch
obsolete
>From 10cecfa3d99bb2ed06f7b0c8f1e784f5c2ce3382 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 27 Oct 2016 11:51:44 -0300 >Subject: [PATCH] Bug 13757: (followup) Rebase against master > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > C4/Members/AttributeTypes.pm | 43 +++++++++++++++++++++++++++---------------- > admin/patron-attr-types.pl | 17 +++++++++-------- > opac/opac-memberentry.pl | 5 +++-- > 3 files changed, 39 insertions(+), 26 deletions(-) > >diff --git a/C4/Members/AttributeTypes.pm b/C4/Members/AttributeTypes.pm >index 487184e..77ba96c 100644 >--- a/C4/Members/AttributeTypes.pm >+++ b/C4/Members/AttributeTypes.pm >@@ -215,23 +215,34 @@ sub store { > WHERE code = ?"); > } else { > $sth = $dbh->prepare_cached("INSERT INTO borrower_attribute_types >- (description, repeatable, unique_id, opac_display, opac_editable, >- staff_searchable, authorised_value_category, display_checkout, category_code, class, code) >- VALUES (?, ?, ?, ?, ?, >- ?, ?, ?, ?, ?, ?)"); >+ ( description, >+ repeatable, >+ unique_id, >+ opac_display, >+ opac_editable, >+ staff_searchable, >+ authorised_value_category, >+ display_checkout, >+ category_code, >+ class, >+ code >+ ) >+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"); > } >- $sth->bind_param(1, $self->{'description'}); >- $sth->bind_param(2, $self->{'repeatable'}); >- $sth->bind_param(3, $self->{'unique_id'}); >- $sth->bind_param(4, $self->{'opac_display'}); >- $sth->bind_param(5, $self->{'opac_editable'}); >- $sth->bind_param(7, $self->{'staff_searchable'}); >- $sth->bind_param(8, $self->{'authorised_value_category'}); >- $sth->bind_param(9, $self->{'display_checkout'}); >- $sth->bind_param(10, $self->{'category_code'} || undef); >- $sth->bind_param(11, $self->{'class'}); >- $sth->bind_param(12, $self->{'code'}); >- $sth->execute; >+ >+ $sth->execute( >+ $self->{'description'}, >+ $self->{'repeatable'}, >+ $self->{'unique_id'}, >+ $self->{'opac_display'}, >+ $self->{'opac_editable'}, >+ $self->{'staff_searchable'} || 0, >+ $self->{'authorised_value_category'}, >+ $self->{'display_checkout'}, >+ $self->{'category_code'} || undef, >+ $self->{'class'}, >+ $self->{'code'} >+ ); > > if ( defined $$self{branches} ) { > $sth = $dbh->prepare("DELETE FROM borrower_attribute_types_branches WHERE bat_code = ?"); >diff --git a/admin/patron-attr-types.pl b/admin/patron-attr-types.pl >index 0cca3b5..178bf37 100755 >--- a/admin/patron-attr-types.pl >+++ b/admin/patron-attr-types.pl >@@ -40,14 +40,15 @@ our $input = new CGI; > my $op = $input->param('op') || ''; > > >-our ($template, $loggedinuser, $cookie) >- = get_template_and_user({template_name => "admin/patron-attr-types.tt", >- query => $input, >- type => "intranet", >- authnotrequired => 0, >- flagsrequired => {parameters => 'parameters_remaining_permissions'}, >- debug => 1, >- }); >+my ( $template, $loggedinuser, $cookie ) = get_template_and_user( >+ { template_name => "admin/patron-attr-types.tt", >+ query => $input, >+ type => "intranet", >+ authnotrequired => 0, >+ flagsrequired => { parameters => 'parameters_remaining_permissions' } >+ } >+); >+ > > $template->param(script_name => $script_name); > >diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl >index 7962b38..07fcea0 100755 >--- a/opac/opac-memberentry.pl >+++ b/opac/opac-memberentry.pl >@@ -23,7 +23,6 @@ use List::MoreUtils qw( each_array uniq ); > use String::Random qw( random_string ); > > use C4::Auth; >-use C4::Koha qw( GetAuthorisedValueByCode ); > use C4::Output; > use C4::Members; > use C4::Form::MessagingPreferences; >@@ -513,7 +512,9 @@ sub GeneratePatronAttributesForm { > foreach my $class (@classes) { > next unless ( $items_by_class{$class} ); > >- my $lib = GetAuthorisedValueByCode( 'PA_CLASS', $class, 1 ) || $class; >+ my $av = Koha::AuthorisedValues->search({ category => 'PA_CLASS', authorised_value => $class }); >+ my $lib = $av->count ? $av->next->opac_description : $class; >+ > push @class_loop, { > class => $class, > items => $items_by_class{$class}, >-- >2.7.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13757
:
42254
|
42626
|
42627
|
47625
|
48040
|
48041
|
48042
|
48043
|
48379
|
48380
|
48381
|
48382
|
56924
|
56925
|
56926
|
56927
|
56928
|
56929
|
57041
|
57042
|
57043
|
57044
|
57045
|
57046
|
58252
|
58253
|
58254
|
58255
|
58351
|
58352
|
58353
|
58354
|
58355
|
58356
|
58357
|
58428
|
58429
|
58581
|
58703
|
58706
|
58707
|
58708
|
58709
|
58710
|
58711
|
58712
|
58713
|
58714
|
58715
|
59376
|
59737
|
59738
|
59739
|
59813
|
59896
|
59897
|
59898
|
60359
|
60360
|
61132
|
61133
|
61134
|
61135
|
61136
|
61137
|
61138
|
61139
|
61140
|
61141
|
61142
|
61143
|
61144
|
61145
|
61146
|
61147
|
61148
|
61149
|
61150
|
61492
|
61493
|
61555
|
61556
|
61557
|
61558
|
61559
|
61560
|
61561
|
61562
|
61563
|
61564
|
61565
|
61566
|
61567
|
61568
|
61569
|
61570
|
61571
|
61572
|
61573
|
61574
|
61575