Revision 64c45e8f
Von Moritz Bunkus vor fast 8 Jahren hinzugefügt
bin/mozilla/ct.pl | ||
---|---|---|
56 | 56 |
use SL::DB::Default; |
57 | 57 |
use SL::DB::DeliveryTerm; |
58 | 58 |
use SL::ReportGenerator; |
59 |
use SL::Locale::String qw(t8); |
|
59 | 60 |
use SL::MoreCommon qw(uri_encode); |
60 | 61 |
|
61 | 62 |
require "bin/mozilla/common.pl"; |
... | ... | |
88 | 89 |
|
89 | 90 |
$form->{title} = $form->{IS_CUSTOMER} ? $locale->text('Customers') : $locale->text('Vendors'); |
90 | 91 |
|
92 |
setup_ct_search_action_bar(); |
|
93 |
|
|
91 | 94 |
$form->header(); |
92 | 95 |
print $form->parse_html_template('ct/search'); |
93 | 96 |
|
... | ... | |
106 | 109 |
'include_value' => 'Y'); |
107 | 110 |
|
108 | 111 |
$::form->{title} = $::locale->text('Search contacts'); |
112 |
|
|
113 |
setup_ct_search_contact_action_bar(); |
|
109 | 114 |
$::form->header; |
110 | 115 |
print $::form->parse_html_template('ct/search_contact'); |
111 | 116 |
|
... | ... | |
295 | 300 |
$report->add_data($row); |
296 | 301 |
} |
297 | 302 |
|
298 |
$report->generate_with_headers(); |
|
303 |
setup_ct_list_names_action_bar(); |
|
304 |
$report->generate_with_headers(action_bar => 1); |
|
299 | 305 |
|
300 | 306 |
$main::lxdebug->leave_sub(); |
301 | 307 |
} |
... | ... | |
426 | 432 |
$report->add_data($row); |
427 | 433 |
} |
428 | 434 |
|
429 |
$report->generate_with_headers; |
|
435 |
$report->generate_with_headers(action_bar => 1);
|
|
430 | 436 |
|
431 | 437 |
$::lxdebug->leave_sub; |
432 | 438 |
} |
433 | 439 |
|
440 |
sub setup_ct_search_action_bar { |
|
441 |
my %params = @_; |
|
442 |
|
|
443 |
for my $bar ($::request->layout->get('actionbar')) { |
|
444 |
$bar->add( |
|
445 |
action => [ |
|
446 |
t8('Continue'), |
|
447 |
submit => [ '#form', { action => 'list_names' } ], |
|
448 |
accesskey => 'enter', |
|
449 |
], |
|
450 |
); |
|
451 |
} |
|
452 |
} |
|
453 |
|
|
454 |
sub setup_ct_list_names_action_bar { |
|
455 |
my %params = @_; |
|
456 |
|
|
457 |
for my $bar ($::request->layout->get('actionbar')) { |
|
458 |
$bar->add( |
|
459 |
action => [ |
|
460 |
$::form->{db} eq 'customer' ? t8('New customer') : t8('New vendor'), |
|
461 |
submit => [ '#new_form', { action => 'CustomerVendor/add' } ], |
|
462 |
accesskey => 'enter', |
|
463 |
], |
|
464 |
); |
|
465 |
} |
|
466 |
} |
|
467 |
|
|
468 |
sub setup_ct_search_contact_action_bar { |
|
469 |
my %params = @_; |
|
470 |
|
|
471 |
for my $bar ($::request->layout->get('actionbar')) { |
|
472 |
$bar->add( |
|
473 |
action => [ |
|
474 |
t8('Continue'), |
|
475 |
submit => [ '#form', { action => 'list_contacts' } ], |
|
476 |
accesskey => 'enter', |
|
477 |
], |
|
478 |
); |
|
479 |
} |
|
480 |
} |
|
481 |
|
|
434 | 482 |
sub continue { call_sub($main::form->{nextsub}); } |
templates/webpages/ct/list_names_bottom.html | ||
---|---|---|
1 | 1 |
[% USE T8 %][% USE HTML %] |
2 | 2 |
|
3 |
<form method="post" action="controller.pl?action=CustomerVendor/add">
|
|
3 |
<form method="post" action="controller.pl" id="new_form">
|
|
4 | 4 |
<input name="callback" type="hidden" value="[% HTML.escape(callback) %]"> |
5 | 5 |
<input name="db" type="hidden" value="[% HTML.escape(db) %]"> |
6 |
|
|
7 |
[% IF IS_CUSTOMER %][% 'New customer' | $T8 %][% ELSE %][% 'New vendor' | $T8 %][% END %]<br> |
|
8 |
|
|
9 |
<input class="submit" type="submit" value="[%- 'Add' | $T8 %]"> |
|
10 | 6 |
</form> |
templates/webpages/ct/search.html | ||
---|---|---|
3 | 3 |
[%- USE HTML %] |
4 | 4 |
<h1>[% title %]</h1> |
5 | 5 |
|
6 |
<form method="post" action="ct.pl" name="Form"> |
|
6 |
<form method="post" action="ct.pl" name="Form" id="form">
|
|
7 | 7 |
|
8 | 8 |
<input type="hidden" name="db" value="[% HTML.escape(db) %]"> |
9 | 9 |
|
... | ... | |
215 | 215 |
</td> |
216 | 216 |
</tr> |
217 | 217 |
</table> |
218 |
|
|
219 |
<input type="hidden" name="nextsub" value="list_names"> |
|
220 |
|
|
221 |
<input type="submit" class="submit" name="action" value="[% 'Continue' | $T8 %]"> |
|
222 | 218 |
</form> |
templates/webpages/ct/search_contact.html | ||
---|---|---|
4 | 4 |
[%- USE LxERP %] |
5 | 5 |
<h1>[% 'Contacts' | $T8 %]</h1> |
6 | 6 |
|
7 |
<form method="post" action="ct.pl" name="Form"> |
|
7 |
<form method="post" action="ct.pl" name="Form" id="form">
|
|
8 | 8 |
|
9 | 9 |
<table> |
10 | 10 |
<tr> |
... | ... | |
132 | 132 |
</td> |
133 | 133 |
</tr> |
134 | 134 |
</table> |
135 |
|
|
136 |
<input type="hidden" name="nextsub" value="list_contacts"> |
|
137 |
|
|
138 |
<input type="submit" class="submit" name="action" value="[% 'Continue' | $T8 %]"> |
|
139 | 135 |
</form> |
Auch abrufbar als: Unified diff
ActionBar: Verwendung bei Kunden-/Lieferanten/Ansprechpersonensuche