Bugzilla – Attachment 29876 Details for
Bug 12612
Remove CGI::scrolling_list from auth_tag_structure.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12612: Remove CGI::scrolling_list from auth_tag_structure.pl
Bug-12612-Remove-CGIscrollinglist-from-authtagstru.patch (text/plain), 3.83 KB, created by
Bernardo Gonzalez Kriegel
on 2014-07-19 17:52:04 UTC
(
hide
)
Description:
Bug 12612: Remove CGI::scrolling_list from auth_tag_structure.pl
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2014-07-19 17:52:04 UTC
Size:
3.83 KB
patch
obsolete
>From 2d357dde68dce327574214381067abcef96b3a0e Mon Sep 17 00:00:00 2001 >From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Date: Sat, 19 Jul 2014 14:47:00 -0300 >Subject: [PATCH] Bug 12612: Remove CGI::scrolling_list from > auth_tag_structure.pl > >This patch removes the only instance in this file. > >Don't know if the feature is of some utility, seems >that does not work (no use of auth values as indicators >on MARC authority editor) > >To test: >1. Apply the patch >2. Go to Administration > Authority types >3. Clic on MARC structure of any fw >4. Clic Edit on any tag >5. On tag editor check the pulldown 'Authorised value', that was replaced >6. Check for regressions: select a value, save, verify the value, change >again, etc. > >Note: removed a SELECT, using now C4::Koha::GetAuthorisedValueCategories >--- > admin/auth_tag_structure.pl | 21 +++++++-------------- > .../prog/en/modules/admin/auth_tag_structure.tt | 18 +++++++++++++++--- > 2 files changed, 22 insertions(+), 17 deletions(-) > >diff --git a/admin/auth_tag_structure.pl b/admin/auth_tag_structure.pl >index 3b06cc2..faf0727 100755 >--- a/admin/auth_tag_structure.pl >+++ b/admin/auth_tag_structure.pl >@@ -100,20 +100,13 @@ if ($op eq 'add_form') { > $sth->execute($searchfield,$authtypecode); > $data=$sth->fetchrow_hashref; > } >- my $sth = $dbh->prepare("select distinct category from authorised_values"); >- $sth->execute; >- my @authorised_values; >- push @authorised_values,""; >- while ((my $category) = $sth->fetchrow_array) { >- push @authorised_values, $category; >- } >- my $authorised_value = CGI::scrolling_list(-name=>'authorised_value', >- -id=>'authorised_value', >- -values=> \@authorised_values, >- -size=>1, >- -multiple=>0, >- -default => $data->{'authorised_value'}, >- ); >+ >+ my @authorised_values = @{C4::Koha::GetAuthorisedValueCategories()}; # function returns array ref, dereferencing >+ unshift @authorised_values, ""; # put empty value first >+ my $authorised_value = { >+ values => \@authorised_values, >+ default => $data->{'authorised_value'}, >+ }; > > if ($searchfield) { > $template->param('searchfield' => $searchfield); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt >index 1d7ee4f..43892ec 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt >@@ -108,9 +108,21 @@ > [% ELSE %] > <input type="checkbox" name="mandatory" id="mandatory" value="1" /> > [% END %] >- </li> >- <li><label for="authorised_value">Authorized value: </label>[% authorised_value %] (if you select a value here, the indicators will be limited to the authorized value list)</li> >-</ol></fieldset> >+ </li> >+ <li><label for="authorised_value">Authorized value: </label> >+ <select name="authorised_value" id="authorised_value" size="1"> >+ [% FOREACH value IN authorised_value.values %] >+ [% IF ( value == authorised_value.default ) %] >+ <option value="[% value %]" selected>[% value %]</option> >+ [% ELSE %] >+ <option value="[% value %]">[% value %]</option> >+ [% END %] >+ [% END %] >+ </select> >+ (if you select a value here, the indicators will be limited to the authorized value list) >+ </li> >+ </ol> >+ </fieldset> > <fieldset class="action"> > <input type="submit" value="Submit" /> > <a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode %]" class="cancel">Cancel</a> >-- >1.9.1
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 12612
:
29876
|
30125
|
30235