Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 1ddebaf1

Von Tamino Steinert vor 6 Tagen hinzugefügt

  • ID 1ddebaf1d00e7cd077424737e0c22de7b3ad5ca6
  • Vorgänger 8ed9bbf1
  • Nachfolger a807c82b

Varianten: Ausprägung löschen

Unterschiede anzeigen:

SL/Controller/VariantProperty.pm
114 114
  );
115 115
}
116 116

  
117
sub action_delete_variant_property_value {
118
  my ($self) = @_;
119

  
120
  die "'variant_property_value.id' is needed" unless $::form->{variant_property_value}->{id};
121

  
122
  my $variant_property_value = SL::DB::Manager::VariantPropertyValue->find_by(
123
    id => $::form->{variant_property_value}->{id}
124
  ) or die t8("Could not find Variant Property Value");
125

  
126
  SL::DB->client->with_transaction(sub {
127
      $variant_property_value->delete;
128
      flash_later('info',
129
        t8(
130
          'The Variant Property Value \'#1\' has been deleted.',
131
          $variant_property_value->displayable_name
132
        )
133
      );
134
      1;
135
    }
136
  ) or flash_later('error',
137
    t8(
138
      'The Variant Property Value \'#1\' is in use and cannot be deleted.',
139
      $variant_property_value->displayable_name
140
    )
141
  );
142

  
143
  $self->redirect_to(
144
    action => 'edit_variant_property',
145
    id     => $variant_property_value->variant_property_id,
146
  );
147
}
148

  
117 149
sub action_add_variant_property_value {
118 150
  my ($self) = @_;
119 151

  
js/kivi.VariantProperty.js
29 29
    $.post('controller.pl', data, kivi.eval_json_result);
30 30
  };
31 31

  
32
  ns.delete_variant_property_value = function() {
33
    var data = $('#variant_property_value_form').serializeArray();
34
    data.push({ name: 'action', value: 'VariantProperty/delete_variant_property_value' });
35
    $.post('controller.pl', data, kivi.eval_json_result);
36
  };
37

  
32 38
  ns.add_variant_property_value = function() {
33 39
    var data = $('#variant_property_value_list_form').serializeArray();
34 40
    data.push({ name: 'action', value: 'VariantProperty/add_variant_property_value' });
locale/de/all
4056 4056
  'The VAT ID number \'#1\' is invalid.' => 'Die UStID-Nummer »#1« ist ungültig.',
4057 4057
  'The VAT ID number in the client configuration is invalid.' => 'Die UStID-Nummer in der Mandantenkonfiguraiton ist ungültig.',
4058 4058
  'The VAT registration number is missing in the client configuration.' => 'Die Umsatzsteuer-ID-Nummer fehlt in der Mandantenkonfiguration.',
4059
  'The Variant Property Value \'#1\' has been deleted.' => 'Die Ausprägung \'#1\' würde gelöscht.',
4060
  'The Variant Property Value \'#1\' is in use and cannot be deleted.' => 'Die Ausprägung \'#1\' is in Verwendung und kann nicht gelöscht werden.',
4059 4061
  'The Variant Property Value has been saved.' => 'Die Ausprägung wurde gespeichert.',
4060 4062
  'The Variant Property has been created.' => 'Die Varianteneigenschaft wurde erfasst.',
4061 4063
  'The Variant Property has been deleted.' => 'Die Varianteneigenschaft wurde gelöscht.',
locale/en/all
4054 4054
  'The VAT ID number \'#1\' is invalid.' => '',
4055 4055
  'The VAT ID number in the client configuration is invalid.' => '',
4056 4056
  'The VAT registration number is missing in the client configuration.' => '',
4057
  'The Variant Property Value \'#1\' has been deleted.' => '',
4058
  'The Variant Property Value \'#1\' is in use and cannot be deleted.' => '',
4057 4059
  'The Variant Property Value has been saved.' => '',
4058 4060
  'The Variant Property has been created.' => '',
4059 4061
  'The Variant Property has been deleted.' => '',
templates/design40_webpages/variant_property/variant_property_value_form.html
60 60

  
61 61
<div class="buttons">
62 62
    [% L.button_tag("kivi.VariantProperty.save_variant_property_value()", LxERP.t8("Save"))  %]
63
    [% L.button_tag("kivi.VariantProperty.delete_variant_property_value()", LxERP.t8("Delete"))  %]
63 64
</div>
64 65

  

Auch abrufbar als: Unified diff