}
&account_header;
- &form_footer;
$main::lxdebug->leave_sub();
}
my $ChartTypeIsAccount = ($form->{charttype} eq "A") ? "1":"";
my $AccountIsPosted = ($form->{orphaned} ) ? "":"1";
+ setup_am_edit_account_action_bar();
+
$form->header();
my $parameters_ref = {
);
}
}
+
+sub setup_am_edit_account_action_bar {
+ my %params = @_;
+
+ for my $bar ($::request->layout->get('actionbar')) {
+ $bar->add(
+ combobox => [
+ action => [
+ t8('Save'),
+ submit => [ '#form', { action => "save_account" } ],
+ disabled => $::form->{id} && !$::form->{orphaned} ? t8('The object is in use and cannot be changed.')
+ : undef,
+ accesskey => 'enter',
+ ],
+
+ action => [
+ t8('Save as new'),
+ submit => [ '#form', { action => "save_as_new_account" } ],
+ disabled => !$::form->{id} ? t8('The object has not been saved yet.') : undef,
+ ],
+ ],
+
+ action => [
+ t8('Delete'),
+ submit => [ '#form', { action => "delete_account" } ],
+ disabled => !$::form->{id} ? t8('The object has not been saved yet.')
+ : $::form->{id} && !$::form->{orphaned} ? t8('The object is in use and cannot be deleted.')
+ : undef,
+ confirm => t8('Do you really want to delete this object?'),
+ ],
+ );
+ }
+}
'The object has been deleted.' => 'Das Objekt wurde gelöscht..',
'The object has been saved.' => 'Das Objekt wurde gespeichert.',
'The object has not been saved yet.' => 'Das Objekt wurde noch nicht gespeichert.',
+ 'The object is in use and cannot be changed.' => 'Das Objekt ist in Benutzung und kann nicht geändert werden.',
'The object is in use and cannot be deleted.' => 'Das Objekt ist in Benutzung und kann nicht gelöscht werden.',
'The option field is empty.' => 'Das Optionsfeld ist leer.',
'The order has been deleted' => 'Der Auftrag wurde gelöscht.',
});
</script>
-<form method="post" name="EditAccount" action="am.pl">
+<form method="post" name="EditAccount" action="am.pl" id="form">
<input type="hidden" name="id" value="[% HTML.escape(id) %]">
<input type="hidden" name="type" value="account">
}
</script>
[% END %]
+[% L.hidden_tag('callback', callback) %]
+</form>