Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 5a8094ff

Von Tamino Steinert vor 2 Monaten hinzugefügt

  • ID 5a8094ff0640748cd4664b79c17dc96b1adf5af8
  • Vorgänger 092a8193
  • Nachfolger f629cfde

Varianten: FIX: Löschen von Eigenschaften

Unterschiede anzeigen:

SL/Controller/VariantProperty.pm
sub action_delete_variant_property {
my ($self) = @_;
if ( eval {
SL::DB->client->with_transaction(sub {
$_->delete for $self->variant_property->property_values;
$self->variant_property->delete;
});
SL::DB->client->with_transaction(sub {
$_->delete for $self->variant_property->property_values;
$self->variant_property->delete;
flash_later('info', t8('The Variant Property has been deleted.'));
1;
} ) {
flash_later('info', t8('The Variant Property has been deleted.'));
} else {
flash_later('error', t8('The Variant Property is in use and cannot be deleted.'));
};
}
) or flash_later('error', t8('The Variant Property is in use and cannot be deleted.'));
$self->redirect_to(action => 'list_variant_properties');
}
......
action => [
t8('Delete'),
submit => [ '#form', { action => "VariantProperty/delete_variant_property" } ],
only_if => $self->variant_property->id,
],
],
action => [

Auch abrufbar als: Unified diff