Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision ea15eb77

Von Tamino Steinert vor etwa 2 Monaten hinzugefügt

  • ID ea15eb77be6bd8ec6999de7700027880eb9fdbba
  • Vorgänger c3b8cc66
  • Nachfolger 978a5f2f

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