Revision c5faf624
Von Moritz Bunkus vor mehr als 2 Jahren hinzugefügt
SL/Controller/Part.pm | ||
---|---|---|
125 | 125 |
my @errors = $self->part->validate; |
126 | 126 |
return $self->js->error(@errors)->render if @errors; |
127 | 127 |
|
128 |
if ($is_new) { |
|
129 |
# Ensure CVars that should be enabled by default actually are when |
|
130 |
# creating new parts. |
|
131 |
my @default_valid_configs = |
|
132 |
grep { ! $_->{flag_defaults_to_invalid} } |
|
133 |
grep { $_->{module} eq 'IC' } |
|
134 |
@{ CVar->get_configs() }; |
|
135 |
|
|
136 |
$::form->{"cvar_" . $_->{name} . "_valid"} = 1 for @default_valid_configs; |
|
137 |
} |
|
138 |
|
|
128 | 139 |
# $self->part has been loaded, parsed and validated without errors and is ready to be saved |
129 | 140 |
$self->part->db->with_transaction(sub { |
130 | 141 |
|
Auch abrufbar als: Unified diff
Artikelstammdaten: bei Neuartikeln CVar-Gültigkeit richtig setzen
Fixt #504.