Revision c7fff13f
Von Moritz Bunkus vor etwa 8 Jahren hinzugefügt
bin/mozilla/am.pl | ||
---|---|---|
$form->{expense} = 1;
|
||
$form->{costs} = 1;
|
||
|
||
setup_am_edit_tax_action_bar();
|
||
$form->header();
|
||
|
||
my $parameters_ref = {
|
||
# ChartTypeIsAccount => $ChartTypeIsAccount,
|
||
LANGUAGES => SL::DB::Manager::Language->get_all_sorted,
|
||
};
|
||
|
||
... | ... | |
|
||
$form->{rate} = $form->format_amount(\%myconfig, $form->{rate}, 2);
|
||
|
||
setup_am_edit_tax_action_bar();
|
||
$form->header();
|
||
|
||
my $parameters_ref = {
|
||
... | ... | |
|
||
$form->{title} = $locale->text('Tax-O-Matic');
|
||
|
||
setup_am_list_tax_action_bar();
|
||
$form->header();
|
||
|
||
my $parameters_ref = {
|
||
};
|
||
|
||
# Ausgabe des Templates
|
||
print($form->parse_html_template('am/list_tax', $parameters_ref));
|
||
print($form->parse_html_template('am/list_tax'));
|
||
|
||
$main::lxdebug->leave_sub();
|
||
}
|
||
... | ... | |
);
|
||
}
|
||
}
|
||
|
||
sub setup_am_list_tax_action_bar {
|
||
my %params = @_;
|
||
|
||
for my $bar ($::request->layout->get('actionbar')) {
|
||
$bar->add(
|
||
link => [
|
||
t8('Add'),
|
||
link => 'am.pl?action=add_tax',
|
||
],
|
||
);
|
||
}
|
||
}
|
||
|
||
sub setup_am_edit_tax_action_bar {
|
||
my %params = @_;
|
||
|
||
for my $bar ($::request->layout->get('actionbar')) {
|
||
$bar->add(
|
||
action => [
|
||
t8('Save'),
|
||
submit => [ '#form', { action => "save_tax" } ],
|
||
accesskey => 'enter',
|
||
],
|
||
|
||
action => [
|
||
t8('Delete'),
|
||
submit => [ '#form', { action => "delete_tax" } ],
|
||
disabled => !$::form->{id} ? t8('The object has not been saved yet.')
|
||
: !$::form->{orphaned} || $::form->{tax_already_used} ? t8('The object is in use and cannot be deleted.')
|
||
: undef,
|
||
confirm => t8('Do you really want to delete this object?'),
|
||
],
|
||
);
|
||
}
|
||
}
|
Auch abrufbar als: Unified diff
ActionBar: Verwendung bei »Steuern«