Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 3e466ad1

Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt

  • ID 3e466ad1ea3380b6dca3e8cd33827a2ef8039a75
  • Vorgänger 7e0814bb
  • Nachfolger b849f0d3

SL::Template: Optionen von den Contrllern zum eigentlichen Template-Modul durchleiten

Unterschiede anzeigen:

SL/Form.pm
1019 1019
                                      file_name => $self->{IN},
1020 1020
                                      form      => $self,
1021 1021
                                      myconfig  => $myconfig,
1022
                                      userspath => $userspath);
1022
                                      userspath => $userspath,
1023
                                      %{ $self->{TEMPLATE_DRIVER_OPTIONS} || {} });
1023 1024

  
1024 1025
  # Copy the notes from the invoice/sales order etc. back to the variable "notes" because that is where most templates expect it to be.
1025 1026
  $self->{"notes"} = $self->{ $self->{"formname"} . "notes" };
SL/Template/Simple.pm
34 34

  
35 35
  $self->{$_} = $params{$_} for keys %params;
36 36

  
37
  $self->{variable_content_types}        ||= {};
38
  $self->{variable_content_types}->{$_}    = lc $self->{variable_content_types}->{$_} for keys %{ $self->{variable_content_types} };
39
  $self->{default_variable_content_type}   = 'text';
40

  
37 41
  $self->{error}     = undef;
38 42
  $self->{quot_re}   = '"';
39 43

  
......
135 139

  
136 140
    my $value               = $self->_get_loop_variable($var, 0, @indices);
137 141
    $value                  = $form->parse_amount({ numberformat => $::myconfig{output_numberformat} || $::myconfig{numberformat} }, $value) if     $options{NOFORMAT};
138
    $value                  = $self->format_string($value)                                                                                   unless $options{NOESCAPE};
142
    $value                  = $self->format_string($value, $var)                                                                             unless $options{NOESCAPE};
139 143

  
140 144
    substr($text, $tag_pos, $tag_len, $value);
141 145
  }

Auch abrufbar als: Unified diff