Revision 978a5f2f
Von Tamino Steinert vor 10 Tagen hinzugefügt
- ID 978a5f2fa0fc595a6c7e9369cd12f1a1488eed9d
- Vorgänger ea15eb77
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 | ||
---|---|---|
4014 | 4014 |
'The VAT ID number \'#1\' is invalid.' => 'Die UStID-Nummer »#1« ist ungültig.', |
4015 | 4015 |
'The VAT ID number in the client configuration is invalid.' => 'Die UStID-Nummer in der Mandantenkonfiguraiton ist ungültig.', |
4016 | 4016 |
'The VAT registration number is missing in the client configuration.' => 'Die Umsatzsteuer-ID-Nummer fehlt in der Mandantenkonfiguration.', |
4017 |
'The Variant Property Value \'#1\' has been deleted.' => 'Die Ausprägung \'#1\' würde gelöscht.', |
|
4018 |
'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.', |
|
4017 | 4019 |
'The Variant Property Value has been saved.' => 'Die Ausprägung wurde gespeichert.', |
4018 | 4020 |
'The Variant Property has been created.' => 'Die Varianteneigenschaft wurde erfasst.', |
4019 | 4021 |
'The Variant Property has been deleted.' => 'Die Varianteneigenschaft wurde gelöscht.', |
locale/en/all | ||
---|---|---|
4012 | 4012 |
'The VAT ID number \'#1\' is invalid.' => '', |
4013 | 4013 |
'The VAT ID number in the client configuration is invalid.' => '', |
4014 | 4014 |
'The VAT registration number is missing in the client configuration.' => '', |
4015 |
'The Variant Property Value \'#1\' has been deleted.' => '', |
|
4016 |
'The Variant Property Value \'#1\' is in use and cannot be deleted.' => '', |
|
4015 | 4017 |
'The Variant Property Value has been saved.' => '', |
4016 | 4018 |
'The Variant Property has been created.' => '', |
4017 | 4019 |
'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
Varianten: Ausprägung löschen