Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 8ed9bbf1

Von Tamino Steinert vor 6 Tagen hinzugefügt

  • ID 8ed9bbf119da6de89a464067e19cc81a9cf36555
  • Vorgänger 19a4866c
  • Nachfolger 1ddebaf1

Varianten: FIX: Löschen von Eigenschaften

Unterschiede anzeigen:

SL/Controller/VariantProperty.pm
50 50
sub action_delete_variant_property {
51 51
  my ($self) = @_;
52 52

  
53
  if ( eval {
54
      SL::DB->client->with_transaction(sub {
55
        $_->delete for $self->variant_property->property_values;
56
        $self->variant_property->delete;
57
      });
53
  SL::DB->client->with_transaction(sub {
54
      $_->delete for $self->variant_property->property_values;
55
      $self->variant_property->delete;
56
      flash_later('info',  t8('The Variant Property has been deleted.'));
58 57
      1;
59
    } ) {
60
    flash_later('info',  t8('The Variant Property has been deleted.'));
61
  } else {
62
    flash_later('error', t8('The Variant Property is in use and cannot be deleted.'));
63
  };
58
    }
59
  ) or flash_later('error', t8('The Variant Property is in use and cannot be deleted.'));
64 60
  $self->redirect_to(action => 'list_variant_properties');
65 61
}
66 62

  
......
183 179
         action => [
184 180
          t8('Delete'),
185 181
          submit => [ '#form', { action => "VariantProperty/delete_variant_property" } ],
182
          only_if => $self->variant_property->id,
186 183
        ],
187 184
      ],
188 185
      action => [

Auch abrufbar als: Unified diff