Revision 002517b4
Von Bernd Bleßmann vor fast 11 Jahren hinzugefügt
SL/Controller/DeliveryTerm.pm | ||
---|---|---|
5 | 5 |
use parent qw(SL::Controller::Base); |
6 | 6 |
|
7 | 7 |
use SL::DB::DeliveryTerm; |
8 |
use SL::DB::Language; |
|
8 | 9 |
use SL::Helper::Flash; |
9 | 10 |
|
10 | 11 |
use Rose::Object::MakeMethods::Generic |
11 | 12 |
( |
12 |
scalar => [ qw(delivery_term) ], |
|
13 |
scalar => [ qw(delivery_term languages) ],
|
|
13 | 14 |
); |
14 | 15 |
|
15 | 16 |
__PACKAGE__->run_before('check_auth'); |
16 | 17 |
__PACKAGE__->run_before('load_delivery_term', only => [ qw(edit update destroy) ]); |
18 |
__PACKAGE__->run_before('load_languages', only => [ qw(new list edit create update) ]); |
|
17 | 19 |
|
18 | 20 |
|
19 | 21 |
# |
... | ... | |
113 | 115 |
$self->{delivery_term} = SL::DB::DeliveryTerm->new(id => $::form->{id})->load; |
114 | 116 |
} |
115 | 117 |
|
118 |
sub load_languages { |
|
119 |
my ($self) = @_; |
|
120 |
$self->{languages} = SL::DB::Manager::Language->get_all_sorted; |
|
121 |
} |
|
122 |
|
|
116 | 123 |
1; |
SL/DB/DeliveryTerm.pm | ||
---|---|---|
8 | 8 |
use SL::DB::MetaSetup::DeliveryTerm; |
9 | 9 |
use SL::DB::Manager::DeliveryTerm; |
10 | 10 |
use SL::DB::Helper::ActsAsList; |
11 |
use SL::DB::Helper::TranslatedAttributes; |
|
11 | 12 |
|
12 | 13 |
|
13 | 14 |
sub validate { |
SL/DO.pm | ||
---|---|---|
895 | 895 |
$h_bin_wh->finish(); |
896 | 896 |
|
897 | 897 |
$form->{delivery_term} = SL::DB::Manager::DeliveryTerm->find_by(id => $form->{delivery_term_id} || undef); |
898 |
$form->{delivery_term}->description_long($form->{delivery_term}->translated_attribute('description_long', $form->{language_id})) if $form->{delivery_term} && $form->{language_id}; |
|
898 | 899 |
|
899 | 900 |
$form->{username} = $myconfig->{name}; |
900 | 901 |
|
SL/IS.pm | ||
---|---|---|
430 | 430 |
$form->set_payment_options($myconfig, $form->{invdate}); |
431 | 431 |
|
432 | 432 |
$form->{delivery_term} = SL::DB::Manager::DeliveryTerm->find_by(id => $form->{delivery_term_id} || undef); |
433 |
$form->{delivery_term}->description_long($form->{delivery_term}->translated_attribute('description_long', $form->{language_id})) if $form->{delivery_term} && $form->{language_id}; |
|
433 | 434 |
|
434 | 435 |
$form->{username} = $myconfig->{name}; |
435 | 436 |
|
SL/OE.pm | ||
---|---|---|
1336 | 1336 |
$dbh->disconnect; |
1337 | 1337 |
|
1338 | 1338 |
$form->{delivery_term} = SL::DB::Manager::DeliveryTerm->find_by(id => $form->{delivery_term_id} || undef); |
1339 |
$form->{delivery_term}->description_long($form->{delivery_term}->translated_attribute('description_long', $form->{language_id})) if $form->{delivery_term} && $form->{language_id}; |
|
1339 | 1340 |
|
1340 | 1341 |
$main::lxdebug->leave_sub(); |
1341 | 1342 |
} |
templates/webpages/delivery_term/form.html | ||
---|---|---|
20 | 20 |
</td> |
21 | 21 |
</tr> |
22 | 22 |
|
23 |
[%- FOREACH language = SELF.languages %] |
|
24 |
<tr> |
|
25 |
<td>[%- HTML.escape(language.description) %] ([%- LxERP.t8('Translation') %])</td> |
|
26 |
<td> |
|
27 |
<input name="translation_[% language.id %]" value="[%- HTML.escape(SELF.delivery_term.translated_attribute('description_long', language, 1)) %]" size="60"> |
|
28 |
</td> |
|
29 |
</tr> |
|
30 |
[%- END %] |
|
31 |
|
|
23 | 32 |
<p> |
24 | 33 |
<input type="hidden" name="id" value="[% SELF.delivery_term.id %]"> |
25 | 34 |
<input type="hidden" name="action" value="DeliveryTerm/dispatch"> |
Auch abrufbar als: Unified diff
Lieferbedingungen übersetzbar gemacht.