Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b81ceec0

Von Sven Schöling vor mehr als 9 Jahren hinzugefügt

  • ID b81ceec0ae27fd58adbb724ad99a6ee48a74af35
  • Vorgänger 227bdad2
  • Nachfolger 1904d8c6

make_record: Zusätzliche Formvariablen speichern.

Unterschiede anzeigen:

SL/Controller/PriceSource.pm
93 93
          : $class->new;
94 94

  
95 95
  for my $method (apply { s/_$row$// } grep { /_$row$/ } keys %$::form) {
96
    next unless $obj->meta->column($method);
97
    if ($obj->meta->column($method)->isa('Rose::DB::Object::Metadata::Column::Date')) {
98
      $obj->${\"$method\_as_date"}($::form->{"$method\_$row"});
99
    } elsif ((ref $obj->meta->column($method)) =~ /^Rose::DB::Object::Metadata::Column::(?:Numeric|Float|DoublePrecsion)$/) {
100
      $obj->${\"$method\_as_number"}($::form->{"$method\_$row"});
101
    } elsif ((ref $obj->meta->column($method)) =~ /^Rose::DB::Object::Metadata::Column::Boolean$/) {
102
      $obj->$method(!!$::form->{$method});
96
    if ($obj->meta->column($method)) {
97
      if ($obj->meta->column($method)->isa('Rose::DB::Object::Metadata::Column::Date')) {
98
        $obj->${\"$method\_as_date"}($::form->{"$method\_$row"});
99
      } elsif ((ref $obj->meta->column($method)) =~ /^Rose::DB::Object::Metadata::Column::(?:Numeric|Float|DoublePrecsion)$/) {
100
        $obj->${\"$method\_as_number"}($::form->{"$method\_$row"});
101
      } elsif ((ref $obj->meta->column($method)) =~ /^Rose::DB::Object::Metadata::Column::Boolean$/) {
102
        $obj->$method(!!$::form->{$method});
103
      } else {
104
        $obj->$method($::form->{"$method\_$row"});
105
      }
103 106
    } else {
104
      $obj->$method($::form->{"$method\_$row"});
107
      $obj->{__additional_form_attributes}{$method} = $::form->{"$method\_$row"};
105 108
    }
106 109
  }
107 110

  

Auch abrufbar als: Unified diff