}
sub form_footer {
- $main::lxdebug->enter_sub();
-
- my $form = $main::form;
- my $locale = $main::locale;
-
- $main::auth->assert('config');
-
- print qq|
-
-<input name=callback type=hidden value="| . H($form->{callback}) . qq|">
-
-<br>|;
- if ((!$form->{id}) || ($form->{id} && $form->{orphaned}) || (($form->{type} eq "account") && (!$form->{new_chart_valid}))) {
- print qq|
-<input type=submit class=submit name=action value="|
- . $locale->text('Save') . qq|">
-|;
-}
-
- if ($form->{id} && $form->{orphaned}) {
- print qq|<input type=submit class=submit name=action value="|
- . $locale->text('Delete') . qq|">|;
- }
-
- if ($form->{id} && $form->{type} eq "account") {
- print qq|
- <input class=submit type=submit name=action value="|
- . $locale->text('Save as new') . qq|">|;
- }
-
- print qq|
-</form>
+ $::lxdebug->enter_sub;
+ $::auth->assert('config');
-</body>
-</html>
-|;
+ print $::form->parse_html_template('am/form_footer', {
+ show_save => !$::form->{id}
+ || ($::form->{id} && $::form->{orphaned})
+ || ($::form->{type} eq "account" && !$::form->{new_chart_valid}),
+ show_delete => $::form->{id} && $::form->{orphaned},
+ show_save_as_new => $::form->{id} && $::form->{type} eq "account",
+ });
- $main::lxdebug->leave_sub();
+ $::lxdebug->leave_sub;
}
sub save_account {
--- /dev/null
+[%- USE T8 %]
+[%- USE L %]
+[%- USE HTML %]
+[%- USE LxERP %]
+[% L.hidden_tag('callback', callback) %]
+
+<br>
+[%- IF show_save %][% L.submit_tag('action', LxERP.t8('Save')) %][% END %]
+[%- IF show_delete %][% L.submit_tag('action', LxERP.t8('Delete')) %][% END %]
+[%- IF show_save_as_new %][% L.submit_tag('action', LxERP.t8('Save as new')) %][% END %]
+
+</form>
+
+</body>
+</html>