Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 2f833a26

Von Sven Schöling vor fast 13 Jahren hinzugefügt

  • ID 2f833a265b6b21799b80724c59456a876ec36ed3
  • Vorgänger a52aa2f2
  • Nachfolger bf8db146

am/form_footer auf template umgeschrieben

Unterschiede anzeigen:

bin/mozilla/am.pl
366 366
}
367 367

  
368 368
sub form_footer {
369
  $main::lxdebug->enter_sub();
370

  
371
  my $form     = $main::form;
372
  my $locale   = $main::locale;
373

  
374
  $main::auth->assert('config');
375

  
376
  print qq|
377

  
378
<input name=callback type=hidden value="| . H($form->{callback}) . qq|">
379

  
380
<br>|;
381
  if ((!$form->{id}) || ($form->{id} && $form->{orphaned}) || (($form->{type} eq "account") && (!$form->{new_chart_valid}))) {
382
    print qq|
383
<input type=submit class=submit name=action value="|
384
    . $locale->text('Save') . qq|">
385
|;
386
}
387

  
388
  if ($form->{id} && $form->{orphaned}) {
389
    print qq|<input type=submit class=submit name=action value="|
390
      . $locale->text('Delete') . qq|">|;
391
  }
392

  
393
  if ($form->{id} && $form->{type} eq "account") {
394
    print qq|
395
    <input class=submit type=submit name=action value="|
396
      . $locale->text('Save as new') . qq|">|;
397
  }
398

  
399
  print qq|
400
</form>
369
  $::lxdebug->enter_sub;
370
  $::auth->assert('config');
401 371

  
402
</body>
403
</html>
404
|;
372
  print $::form->parse_html_template('am/form_footer', {
373
    show_save        => !$::form->{id}
374
                     || ($::form->{id} && $::form->{orphaned})
375
                     || ($::form->{type} eq "account" && !$::form->{new_chart_valid}),
376
    show_delete      => $::form->{id} && $::form->{orphaned},
377
    show_save_as_new => $::form->{id} && $::form->{type} eq "account",
378
  });
405 379

  
406
  $main::lxdebug->leave_sub();
380
  $::lxdebug->leave_sub;
407 381
}
408 382

  
409 383
sub save_account {
templates/webpages/am/form_footer.html
1
[%- USE T8 %]
2
[%- USE L %]
3
[%- USE HTML %]
4
[%- USE LxERP %]
5
[% L.hidden_tag('callback', callback) %]
6

  
7
<br>
8
[%- IF show_save %][% L.submit_tag('action', LxERP.t8('Save')) %][% END %]
9
[%- IF show_delete %][% L.submit_tag('action', LxERP.t8('Delete')) %][% END %]
10
[%- IF show_save_as_new %][% L.submit_tag('action', LxERP.t8('Save as new')) %][% END %]
11

  
12
</form>
13

  
14
</body>
15
</html>

Auch abrufbar als: Unified diff