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 fund 2. Apply the patch 3. Go to Aquisitions, click on your fund 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) Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Looks like this needs more work, but no regressions found that were caused by the patch. Passes tests and QA script. Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
parent
9561bab783
commit
1b25d910ae
|
|
@ -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 );
|
||||
|
||||
|
|
|
|||
|
|
@ -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="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 %]" />
|
||||
|
|
|
|||
Loading…
Reference in New Issue