}
}
+sub setup_do_search_action_bar {
+ my %params = @_;
+
+ for my $bar ($::request->layout->get('actionbar')) {
+ $bar->add(
+ action => [
+ t8('Search'),
+ submit => [ '#form' ],
+ accesskey => 'enter',
+ ],
+ );
+ }
+}
+
+sub setup_do_orders_action_bar {
+ my %params = @_;
+
+ for my $bar ($::request->layout->get('actionbar')) {
+ $bar->add(
+ action => [
+ t8('New invoice'),
+ submit => [ '#orders_form' ],
+ checks => [ 'kivi.DeliveryOrder.multi_invoice_check_delivery_orders_selected' ],
+ accesskey => 'enter',
+ ],
+ );
+ }
+}
+
sub form_header {
$main::lxdebug->enter_sub();
$form->{ALL_DEPARTMENTS} = SL::DB::Manager::Department->get_all;
$form->{title} = $locale->text('Delivery Orders');
+ setup_do_search_action_bar();
+
$form->header();
print $form->parse_html_template('do/search');
$idx++;
}
- $report->generate_with_headers();
+ $::request->layout->add_javascripts('kivi.DeliveryOrder.js');
+
+ setup_do_orders_action_bar();
+
+ $report->generate_with_headers(action_bar => 1);
$main::lxdebug->leave_sub();
}
--- /dev/null
+namespace('kivi.DeliveryOrder', function(ns) {
+ ns.multi_invoice_check_delivery_orders_selected = function() {
+ if ($('#orders_form tbody input[type=checkbox]:checked').length > 0)
+ return true;
+
+ alert(kivi.t8('You have not selected any delivery order.'));
+
+ return false;
+ };
+});
"Update quotation/order":"Auftrag/Angebot aktualisieren",
"Version actions":"Aktionen für Versionen",
"Yes":"Ja",
+"You have not selected any delivery order.":"Sie haben keinen Lieferschein ausgewählt.",
"filename has not uploadable characters ":"Bitte Dateinamen ändern. Er hat für den Upload nicht verwendbare Sonderzeichen ",
"filesize too big: ":"Datei zu groß: ",
"flat-rate position":"Pauschalposition",
'Export Stammdaten' => 'Export Stammdaten',
'Export as CSV' => 'Als CSV exportieren',
'Export as PDF' => 'Als PDF exportieren',
- 'Export as PDF with attachments' => 'Als PDF mit Anhängen exportieren',
'Export date' => 'Exportdatum',
'Export date from' => 'Exportdatum von',
'Export date to' => 'Exportdatum bis',
-[%- USE T8 %]
-[% USE HTML %]
-<table width="100%">
- <tr><td width = "200px" >
- [% 'New invoice' | $T8 %]</td><td width = "150px">
- <input class="submit" type="submit" name="action" value="[% 'Continue' | $T8 %]">
- <input type="hidden" name="nextsub" value="invoice_multi">
+[% USE HTML %][%- USE T8 -%]
+ <input type="hidden" name="action" value="invoice_multi">
<input type="hidden" name="type" value="[% HTML.escape(type) %]">
<input type="hidden" name="vc" value="[% HTML.escape(vc) %]">
<input type="hidden" name="callback" value="[% HTML.escape(callback) %]">
<input type="hidden" name="rowcount" value="[% HTML.escape(rowcount) %]">
-</td><td></td></tr></table></form>
+</form>
<form method="post" id="print_multi_id">
[% print_options %]
<div id="mass_print_dialog" style="display: none"></div>
[%- INCLUDE 'common/flash.html' %]
-<form method="post" id="do_id" action="do.pl">
+<form method="post" action="do.pl" id="orders_form">
}
</style>
- <form method="post" action="do.pl" name="Form">
+ <form method="post" action="do.pl" name="Form" id="form">
<p>
<table>
</table>
</p>
- <hr size="3" noshade>
-
- <p>
- <input type="hidden" name="nextsub" value="orders">
+ <input type="hidden" name="action" value="orders">
<input type="hidden" name="vc" value="[% HTML.escape(vc) %]">
<input type="hidden" name="type" value="[% HTML.escape(type) %]">
-
- <input class="submit" type="submit" name="action" value="[% 'Continue' | $T8 %]">
- </p>
</form>