'include_prefix' => 'l_',
'include_value' => 'Y');
+ setup_ic_search_action_bar();
$form->header;
$form->get_lists('partsgroup' => 'ALL_PARTSGROUPS');
$report->add_data($row);
}
- $report->generate_with_headers();
+ setup_ic_generate_report_action_bar();
+ $report->generate_with_headers(action_bar => 1);
$lxdebug->leave_sub();
} #end generate_report
-sub continue { call_sub($form->{"nextsub"}); }
+sub setup_ic_search_action_bar {
+ my %params = @_;
+
+ for my $bar ($::request->layout->get('actionbar')) {
+ $bar->add(
+ action => [
+ t8('Continue'),
+ submit => [ '#form', { action => 'generate_report' } ],
+ accesskey => 'enter',
+ ],
+
+ action => [
+ t8('TOP100'),
+ submit => [ '#form', { action => 'top100' } ],
+ ],
+ );
+ }
+}
+
+sub setup_ic_generate_report_action_bar {
+ my %params = @_;
+
+ for my $bar ($::request->layout->get('actionbar')) {
+ $bar->add(
+ combobox => [
+ action => [
+ t8('Add'),
+ ],
+ action => [
+ t8('Add Part'),
+ submit => [ '#new_form', { action => 'Part/add_part' } ],
+ accesskey => 'enter',
+ ],
+ action => [
+ t8('Add Service'),
+ submit => [ '#new_form', { action => 'Part/add_service' } ],
+ ],
+ action => [
+ t8('Add Assembly'),
+ submit => [ '#new_form', { action => 'Part/add_assembly' } ],
+ ],
+ action => [
+ t8('Add Assortment'),
+ submit => [ '#new_form', { action => 'Part/add_assortment' } ],
+ ],
+ ], # end of combobox "Add part"
+ );
+ }
+}
</table></td></tr>
</table>
-<form method="post" action="controller.pl">
-
+<form method="post" action="controller.pl" id="new_form">
<input name="callback" type="hidden" value="[% HTML.escape(callback) %]">
-
- <input type="hidden" name="action" id="item_id" value="Part/add_part">
-
- <input class="submit" type="submit" onclick="$('#item_id').val('Part/add_part');return true;" value="[%- 'Add Part' | $T8 %]">
- <input class="submit" type="submit" onclick="$('#item_id').val('Part/add_service');return true;" value="[%- 'Add Service' | $T8 %]">
- <input class="submit" type="submit" onclick="$('#item_id').val('Part/add_assembly');return true;" value="[%- 'Add Assembly' | $T8 %]">
- <input class="submit" type="submit" onclick="$('#item_id').val('Part/add_assortment');return true;" value="[%- 'Add Assortment' | $T8 %]">
-
</form>
[% SET style="width: 250px" %]
<h1>[% title %]</h1>
- <form method="post" action="ic.pl">
+ <form method="post" action="ic.pl" id="form">
<input type="hidden" name="searchitems" value="[% HTML.escape(searchitems) %]">
<input type="hidden" name="title" value="[% HTML.escape(title) %]">
<input type="hidden" name="revers" value="[% HTML.escape(revers) %]">
<input type="hidden" name="lastsort" value="[% HTML.escape(lastsort) %]">
- <input type="hidden" name="nextsub" value="generate_report">
<input type="hidden" name="sort" value="description">
<input type="hidden" name="ndxs_counter" value="[% HTML.escape(ndxs_counter) %]">
</tr>
<tr><td colspan="4"><hr size="3" noshade></td></tr>
</table>
-
- <p>
- <input class="submit" type="submit" name="action" value="[% 'Continue' | $T8 %]">
- <input class="submit" type="submit" name="action" value="[% 'TOP100' | $T8 %]">
- </p>
</form>