Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 86937e15

Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt

  • ID 86937e158181c9683401c23cf55bf015d55b784a
  • Vorgänger 576c2a14
  • Nachfolger 009d4b89

Form::info() auf Templates umgestellt und Auto-Redirect-Target angepasst

Unterschiede anzeigen:

SL/Form.pm
315 315
  my ($self, $msg) = @_;
316 316

  
317 317
  if ($ENV{HTTP_USER_AGENT}) {
318
    $msg =~ s/\n/<br>/g;
319

  
320
    if (!$self->{header}) {
321
      $self->header;
322
      print qq|<body>|;
323
    }
324

  
325
    print qq|
326
    <p class="message_ok"><b>$msg</b></p>
327

  
328
    <script type="text/javascript">
329
    <!--
330
    // If JavaScript is enabled, the whole thing will be reloaded.
331
    // The reason is: When one changes his menu setup (HTML / CSS ...)
332
    // it now loads the correct code into the browser instead of do nothing.
333
    setTimeout("top.frames.location.href='login.pl'",500);
334
    //-->
335
    </script>
336

  
337
</body>
338
    |;
318
    $self->header;
319
    print $self->parse_html_template('generic/form_info', { message => $msg });
339 320

  
321
  } elsif ($self->{info_function}) {
322
    &{ $self->{info_function} }($msg);
340 323
  } else {
341

  
342
    if ($self->{info_function}) {
343
      &{ $self->{info_function} }($msg);
344
    } else {
345
      print "$msg\n";
346
    }
324
    print "$msg\n";
347 325
  }
348 326

  
349 327
  $main::lxdebug->leave_sub();
templates/webpages/generic/form_info.html
1
[%- USE P -%]
2
<div class="message_ok">
3
 <b>[% P.simple_format(message) %]</b>
4
</div>
5

  
6
<script type="text/javascript">
7
<!--
8
 // If JavaScript is enabled, the whole thing will be reloaded.
9
 // The reason is: When one changes his menu setup (HTML / CSS ...)
10
 // it now loads the correct code into the browser instead of do nothing.
11
 setTimeout("top.frames.location.href='login.pl?action=company_logo'",500);
12
-->
13
</script>

Auch abrufbar als: Unified diff