Bugzilla – Attachment 29870 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::scrolling_list from aqplan.pl
Bug-766-Remove-CGIscrollinglist-from-aqplanpl.patch (text/plain), 5.61 KB, created by
Bernardo Gonzalez Kriegel
on 2014-07-19 00:50:17 UTC
(
hide
)
Description:
Bug 766: Remove CGI::scrolling_list from aqplan.pl
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2014-07-19 00:50:17 UTC
Size:
5.61 KB
patch
obsolete
>From e4274dc28bdc84c5fa1114a759c84ae01de75aa4 Mon Sep 17 00:00:00 2001 >From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Date: Mon, 14 Jul 2014 21:10:57 -0300 >Subject: [PATCH] Bug 766: Remove CGI::scrolling_list from aqplan.pl > >This patch removes 3 occurences on aqplan.pl > >To test: >1. You need a budget and a found >2. Apply the patch >3. Go to Aquisitions, click on your found >4. Select one of the options on pulldown Planning >e.g. "Plan by months" >5. Now to the left there are two boxes, Filter and Export > >a) Filter: (1) pulldown below 'Select planning type' >check that works selecting other values and submit >This pulldown showed originally code types, >untranslatable BTW. Added a TT block to allow translation >and shows legends that match Planning pulldown, but not >the order. > >b) Export: pulldowns for filetype (2) and delimiter (3) >Those have originally one value each, and for me Export >does not work, before or after patch, but check that >pulldown exist. > >Notes: >A) 5.a) I can change de order of main Planning pulldown, >is harcoded. The values for Filter pulldown are sorted on >aqplan.pl. Is one or the other. >If desired, TT block can be moved to includes/budgets-admin-toolbar.inc >(where hardcoded Planning lives) > >B) 5.b) Moved 'Export' legend inside it's box, like Filter. > >C) Finally: there is something strange, before or after patch. >There is an empty option 'Planning by " if you select planning >using main pulldown, it disappears if you select planning using >Filter (not a mistery, using Planning fills $auth_cats_loop, >using Filter submit button does not) >--- > admin/aqplan.pl | 32 ++++--------------- > .../intranet-tmpl/prog/en/modules/admin/aqplan.tt | 37 ++++++++++++++++++---- > 2 files changed, 36 insertions(+), 33 deletions(-) > >diff --git a/admin/aqplan.pl b/admin/aqplan.pl >index d4f355e..4be57a6 100755 >--- a/admin/aqplan.pl >+++ b/admin/aqplan.pl >@@ -156,17 +156,11 @@ push( @category_list, $$_{'authcat'} ) foreach @$auth_cats_loop; > > #reorder the list > @category_list = sort { $a cmp $b } @category_list; >-my $tab_list = CGI::scrolling_list( >- -name => 'authcat', >- -id => 'authcat', >- -values => \@category_list, >- -default => $authcat, >- -size => 1, >- -tabindex => '', >- -multiple => 0, >-); > >-$template->param( authcat_dropbox => $tab_list ); >+$template->param( authcat_dropbox => { >+ values => \@category_list, >+ default => $authcat, >+ }); > > my @budgets = @$budgets_ref; > my $CGISort; >@@ -330,22 +324,8 @@ foreach my $n (@names) { > # ------------------------------------------------------------ > # DEFAULT DISPLAY BEGINS > >-my $CGIextChoice = CGI::scrolling_list( >- -name => 'MIME', >- -id => 'MIME', >- -values => ['CSV'], # FIXME translation >- -size => 1, >- -multiple => 0 >-); >- >-my @dels = ( C4::Context->preference("delimiter") ); >-my $CGIsepChoice = CGI::scrolling_list( >- -name => 'sep', >- -id => 'sep', >- -values => \@dels, >- -size => 1, >- -multiple => 0 >-); >+my $CGIextChoice = ( 'CSV' ); # FIXME translation >+my $CGIsepChoice = ( C4::Context->preference("delimiter") ); > > my ( @budget_lines, %cell_hash ); > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt >index 7f0d901..6f830ea 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt >@@ -235,11 +235,25 @@ > <form method="post" action="/cgi-bin/koha/admin/aqplan.pl"> > <fieldset class="brief"> > <h4>Filter</h4> >- >+[% BLOCK planning_types %] >+[% SWITCH type %] >+[% CASE 'MONTHS' %]<span>by months</span> >+[% CASE 'ITEMTYPES' %]<span>by item types</span> >+[% CASE 'BRANCHES' %]<span>by libraries</span> >+[% END %] >+[% END %] > <ol> > <li> > <label for="authcat"> Select planning type:</label> >- [% authcat_dropbox %] >+ <select name="authcat" id="authcat" size="1"> >+ [% FOREACH value IN authcat_dropbox.values %] >+ [% IF ( value == authcat_dropbox.default ) %] >+ <option value="[% value %]" selected>[% PROCESS planning_types type=value %]</option> >+ [% ELSE %] >+ <option value="[% value %]">[% PROCESS planning_types type=value %]</option> >+ [% END %] >+ [% END %] >+ </select> > </li> > <li class="radio"> > [% IF ( show_mine ) %] >@@ -275,13 +289,22 @@ > </form> > [% IF ( budget_lines ) %] > <form method="post" action="/cgi-bin/koha/admin/aqplan.pl"> >-<h4>Export</h4> > <fieldset class="brief"> >+<h4>Export</h4> > <ol> >- <li><label for="basename">Output to a file named: </label><input type="text" name="basename" id="basename" value="Export" /></li> >- <li><label class="inline" for="MIME">Into an application >- </label>[% CGIextChoice %] >- [% CGIsepChoice %]</li> >+ <li><label for="basename">Output to a file named: </label><input type="text" name="basename" id="basename" value="Export" /></li> >+ <li><label class="inline" for="MIME">Into an application</label> >+ <select name="MIME" id="MIME" size="1"> >+ [% FOREACH value IN CGIextChoice %] >+ <option value="[% value %]">[% value %]</option> >+ [% END %] >+ </select> >+ <select name="sep" id="sep" size="1"> >+ [% FOREACH value IN CGIsepChoice %] >+ <option value="[% value %]">[% value %]</option> >+ [% END %] >+ </select> >+ </li> > </ol> > <fieldset class="action"> <input type="submit" value="Submit"/> > <input type="hidden" name="report_name" value="[% report_name %]" /> >-- >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