Revision eedbd129
Von Tamino Steinert vor 12 Monaten hinzugefügt
SL/Controller/Reclamation.pm | ||
---|---|---|
25 | 25 |
use SL::DB::Shipto; |
26 | 26 |
use SL::DB::Translation; |
27 | 27 |
use SL::DB::ValidityToken; |
28 |
use SL::DB::EmailJournal; |
|
28 | 29 |
use SL::DB::Helper::RecordLink qw(set_record_link_conversions RECORD_ID RECORD_TYPE_REF RECORD_ITEM_ID RECORD_ITEM_TYPE_REF); |
29 | 30 |
use SL::DB::Helper::TypeDataProxy; |
30 | 31 |
use SL::DB::Helper::Record qw(get_object_name_from_type get_class_from_type); |
... | ... | |
149 | 150 |
); |
150 | 151 |
} |
151 | 152 |
|
153 |
sub action_add_from_email_journal { |
|
154 |
my ($self) = @_; |
|
155 |
die "No 'email_journal_id' was given." unless ($::form->{email_journal_id}); |
|
156 |
|
|
157 |
$self->action_add(); |
|
158 |
} |
|
159 |
|
|
160 |
sub action_edit_with_email_journal_workflow { |
|
161 |
my ($self) = @_; |
|
162 |
die "No 'email_journal_id' was given." unless ($::form->{email_journal_id}); |
|
163 |
$::form->{workflow_email_journal_id} = delete $::form->{email_journal_id}; |
|
164 |
$::form->{workflow_email_attachment_id} = delete $::form->{email_attachment_id}; |
|
165 |
|
|
166 |
$self->action_edit(); |
|
167 |
} |
|
168 |
|
|
152 | 169 |
# edit an existing reclamation |
153 | 170 |
sub action_edit { |
154 | 171 |
my ($self) = @_; |
... | ... | |
521 | 538 |
type => $to_type, |
522 | 539 |
from_id => $self->reclamation->id, |
523 | 540 |
from_type => $self->reclamation->type, |
541 |
email_journal_id => $::form->{workflow_email_journal_id}, |
|
542 |
email_attachment_id => $::form->{workflow_email_attachment_id}, |
|
524 | 543 |
%additional_params, |
525 | 544 |
); |
526 | 545 |
} |
... | ... | |
543 | 562 |
controller => 'is.pl', |
544 | 563 |
action => 'credit_note_from_reclamation', |
545 | 564 |
from_id => $self->reclamation->id, |
565 |
email_journal_id => $::form->{workflow_email_journal_id}, |
|
566 |
email_attachment_id => $::form->{workflow_email_attachment_id}, |
|
546 | 567 |
); |
547 | 568 |
} |
548 | 569 |
|
... | ... | |
1551 | 1572 |
items_to_delete => $items_to_delete, |
1552 | 1573 |
); |
1553 | 1574 |
|
1575 |
if ($::form->{email_journal_id}) { |
|
1576 |
my $email_journal = SL::DB::EmailJournal->new( |
|
1577 |
id => delete $::form->{email_journal_id} |
|
1578 |
)->load; |
|
1579 |
$email_journal->link_to_record_with_attachment( |
|
1580 |
$self->reclamation, |
|
1581 |
delete $::form->{email_attachment_id} |
|
1582 |
); |
|
1583 |
} |
|
1584 |
|
|
1554 | 1585 |
delete $::form->{form_validity_token}; |
1555 | 1586 |
} |
1556 | 1587 |
|
templates/design40_webpages/reclamation/form.html | ||
---|---|---|
4 | 4 |
[%- USE HTML %] |
5 | 5 |
[% # L.dump( SELF.reclamation.items_sorted ) %] |
6 | 6 |
|
7 |
[% IF FORM.workflow_email_journal_id %] |
|
8 |
[% SET FORM.title = LxERP.t8("Email Journal Workflow") _ " - " _ FORM.title %] |
|
9 |
[% END %] |
|
7 | 10 |
<h1>[% FORM.title %] <span id='nr_in_title'>[%- SELF.reclamation.record_number -%]</span></h1> |
8 | 11 |
|
9 | 12 |
<div id="print_options" style="display:none"> |
... | ... | |
22 | 25 |
[% L.hidden_tag('type', FORM.type) %] |
23 | 26 |
[% L.hidden_tag('id', SELF.reclamation.id) %] |
24 | 27 |
[% L.hidden_tag('converted_from_record_type_ref', SELF.reclamation.converted_from_record_type_ref) %] |
25 |
[% L.hidden_tag('converted_from_record_id', SELF.reclamation.converted_from_record_id) %] |
|
28 |
[% L.hidden_tag('converted_from_record_id', SELF.reclamation.converted_from_record_id) %] |
|
29 |
[% L.hidden_tag('email_journal_id', FORM.email_journal_id) %] |
|
30 |
[% L.hidden_tag('email_attachment_id', FORM.email_attachment_id) %] |
|
31 |
[% L.hidden_tag('workflow_email_journal_id', FORM.workflow_email_journal_id) %] |
|
32 |
[% L.hidden_tag('workflow_email_attachment_id', FORM.workflow_email_attachment_id) %] |
|
26 | 33 |
|
27 | 34 |
[% IF !SELF.reclamation.id %] |
28 | 35 |
[% L.hidden_tag('form_validity_token', FORM.form_validity_token) %] |
... | ... | |
33 | 40 |
<div class="tabwidget" id="reclamation_tabs"> |
34 | 41 |
<ul> |
35 | 42 |
<li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li> |
43 |
[% IF FORM.email_attachment_id || FORM.workflow_email_attachment_id %] |
|
44 |
<li><a href="controller.pl?action=EmailJournal/attachment_preview&attachment_id=[% HTML.url(FORM.email_attachment_id || FORM.workflow_email_attachment_id) %]">[% 'Email Attachment Preview' | $T8 %]</a></li> |
|
45 |
[% END %] |
|
36 | 46 |
[%- IF INSTANCE_CONF.get_webdav %] |
37 | 47 |
<li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li> |
38 | 48 |
[%- END %] |
templates/design40_webpages/reclamation/tabs/basic_data.html | ||
---|---|---|
8 | 8 |
|
9 | 9 |
<div id="ui-tabs-basic-data"> |
10 | 10 |
|
11 |
[% IF FORM.email_attachment_id || FORM.workflow_email_attachment_id%] |
|
12 |
<div class="wrapper" id="email_attachment_wrapper"> |
|
13 |
[% |
|
14 |
BLOCK panel_1; |
|
15 |
P.email_journal.attachment_preview( |
|
16 |
FORM.email_attachment_id || FORM.workflow_email_attachment_id, |
|
17 |
style="height:600px" |
|
18 |
); |
|
19 |
END; |
|
20 |
INCLUDE 'common/toggle_panel.html' |
|
21 |
block_name='panel_1' |
|
22 |
button_closed = LxERP.t8('Show Attachment') |
|
23 |
button_open = LxERP.t8('Hide Attachment') |
|
24 |
; |
|
25 |
%] |
|
26 |
</div> |
|
27 |
[% END %] |
|
28 |
|
|
11 | 29 |
<div class="wrapper" id="wrapper-1"> |
12 | 30 |
[% INCLUDE 'generic/toggle_wrapper.html' %] |
13 | 31 |
|
templates/webpages/reclamation/form.html | ||
---|---|---|
4 | 4 |
[%- USE HTML %] |
5 | 5 |
[% # L.dump( SELF.reclamation.items_sorted ) %] |
6 | 6 |
|
7 |
[% IF FORM.workflow_email_journal_id %] |
|
8 |
[% SET FORM.title = LxERP.t8("Email Journal Workflow") _ " - " _ FORM.title %] |
|
9 |
[% END %] |
|
7 | 10 |
<h1>[% FORM.title %] <span id='nr_in_title'>[%- SELF.reclamation.record_number -%]</span></h1> |
8 | 11 |
|
9 | 12 |
<div id="print_options" style="display:none"> |
... | ... | |
22 | 25 |
[% L.hidden_tag('type', FORM.type) %] |
23 | 26 |
[% L.hidden_tag('id', SELF.reclamation.id) %] |
24 | 27 |
[% L.hidden_tag('converted_from_record_type_ref', SELF.reclamation.converted_from_record_type_ref) %] |
25 |
[% L.hidden_tag('converted_from_record_id', SELF.reclamation.converted_from_record_id) %] |
|
28 |
[% L.hidden_tag('converted_from_record_id', SELF.reclamation.converted_from_record_id) %] |
|
29 |
[% L.hidden_tag('email_journal_id', FORM.email_journal_id) %] |
|
30 |
[% L.hidden_tag('email_attachment_id', FORM.email_attachment_id) %] |
|
31 |
[% L.hidden_tag('workflow_email_journal_id', FORM.workflow_email_journal_id) %] |
|
32 |
[% L.hidden_tag('workflow_email_attachment_id', FORM.workflow_email_attachment_id) %] |
|
26 | 33 |
|
27 | 34 |
[% IF !SELF.reclamation.id %] |
28 | 35 |
[% L.hidden_tag('form_validity_token', FORM.form_validity_token) %] |
... | ... | |
33 | 40 |
<div class="tabwidget" id="reclamation_tabs"> |
34 | 41 |
<ul> |
35 | 42 |
<li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li> |
43 |
[% IF FORM.email_attachment_id || FORM.workflow_email_attachment_id %] |
|
44 |
<li><a href="controller.pl?action=EmailJournal/attachment_preview&attachment_id=[% HTML.url(FORM.email_attachment_id || FORM.workflow_email_attachment_id) %]">[% 'Email Attachment Preview' | $T8 %]</a></li> |
|
45 |
[% END %] |
|
36 | 46 |
[%- IF INSTANCE_CONF.get_webdav %] |
37 | 47 |
<li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li> |
38 | 48 |
[%- END %] |
Auch abrufbar als: Unified diff
Workflow: E-Mail → Reklamation hinzugefügt