Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision ac9bfb42

Von Moritz Bunkus vor etwa 13 Jahren hinzugefügt

  • ID ac9bfb42f5de6eced6baaa0b571fdbb120c45569
  • Vorgänger b88b33d1
  • Nachfolger 388a2ff5

Variablen in Druckvorlagen optional unformatiert ausgeben lassen

Unterschiede anzeigen:

SL/Template/Simple.pm
125 125

  
126 126
  while ($text =~ /$self->{substitute_vars_re}/) {
127 127
    my ($tag_pos, $tag_len) = ($-[0], $+[0] - $-[0]);
128
    my ($var, @options)     = split(/\s+/, $1);
128
    my ($var, @option_list) = split(/\s+/, $1);
129
    my %options             = map { ($_ => 1) } @option_list;
129 130

  
130 131
    my $value               = $self->_get_loop_variable($var, 0, @indices);
131
    $value                  = $self->format_string($value) unless (grep(/^NOESCAPE$/, @options));
132
    $value                  = $form->parse_amount({ numberformat => $::myconfig{output_numberformat} || $::myconfig{numberformat} }, $value) if     $options{NOFORMAT};
133
    $value                  = $self->format_string($value)                                                                                   unless $options{NOESCAPE};
132 134

  
133 135
    substr($text, $tag_pos, $tag_len, $value);
134 136
  }
bin/mozilla/io.pl
1341 1341
    $output_longdates = 1;
1342 1342
  }
1343 1343

  
1344
  # Store the output number format so that the template modules know
1345
  # how to parse the amounts back if requested.
1346
  $myconfig{output_numberformat} = $output_numberformat;
1347

  
1344 1348
  ($form->{employee}) = split /--/, $form->{employee};
1345 1349

  
1346 1350
  # create the form variables

Auch abrufbar als: Unified diff