Bugzilla – Attachment 29871 Details for
Bug 766
Omnibus: Use of CGI::scrolling_list prevents customization in template
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 766: Remove CGI::scrollinglist from marctagstructure.pl
Bug-766-Remove-CGIscrollinglist-from-marctagstruct.patch (text/plain), 3.36 KB, created by
Bernardo Gonzalez Kriegel
on 2014-07-19 02:13:18 UTC
(
hide
)
Description:
Bug 766: Remove CGI::scrollinglist from marctagstructure.pl
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2014-07-19 02:13:18 UTC
Size:
3.36 KB
patch
obsolete
>From d80727f7e3888f1ffb04c6609b56aa455fb52749 Mon Sep 17 00:00:00 2001 >From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Date: Fri, 18 Jul 2014 22:51:22 -0300 >Subject: [PATCH] Bug 766: Remove CGI::scrollinglist from marctagstructure.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 editor) > >To test: >1. Apply the patch >2. Go to Administration > MARC frameworks >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 >Do not we need an AuthorisedValues.pm? (on C4 or Koha) >--- > admin/marctagstructure.pl | 20 ++++++-------------- > .../prog/en/modules/admin/marctagstructure.tt | 12 +++++++++++- > 2 files changed, 17 insertions(+), 15 deletions(-) > >diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl >index 3ff48b4..cdefba4 100755 >--- a/admin/marctagstructure.pl >+++ b/admin/marctagstructure.pl >@@ -100,20 +100,12 @@ if ($op eq 'add_form') { > $sth->execute($searchfield,$frameworkcode); > $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', >- -values=> \@authorised_values, >- -size=>1, >- -id=>"authorised_value", >- -multiple=>0, >- -default => $data->{'authorised_value'}, >- ); >+ >+ my @authorised_values = ( "", @{C4::Koha::GetAuthorisedValueCategories()} ); >+ 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/marctagstructure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt >index 80f3748..000c19d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt >@@ -92,7 +92,17 @@ $(document).ready(function() { > <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> >+ <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="Save changes" /> >-- >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 766
:
18538
|
18550
|
18664
|
25904
|
25905
|
25906
|
25907
|
26401
|
27010
|
27011
|
27012
|
27013
|
27014
|
27044
|
27045
|
27046
|
27047
|
27048
|
27396
|
27400
|
27441
|
27442
|
27443
|
27444
|
27445
|
27446
|
27447
|
27448
|
27479
|
27495
|
27665
|
27666
|
27667
|
27668
|
27669
|
27670
|
27671
|
29870
|
29871
|
29872
|
29877
|
30404
|
30405
|
30406
|
30428
|
30430
|
30432
|
30510
|
30511
|
30512