Revision e83604f2
Von Moritz Bunkus vor fast 9 Jahren hinzugefügt
SL/Controller/Letter.pm | ||
---|---|---|
221 | 221 |
template => $template_file, |
222 | 222 |
variables => $::form, |
223 | 223 |
return => 'file_name', |
224 |
variable_content_types => { |
|
225 |
body => 'html', |
|
226 |
}, |
|
224 | 227 |
); |
225 | 228 |
|
226 | 229 |
my $pdf_file_name; |
... | ... | |
306 | 309 |
sub _display { |
307 | 310 |
my ($self, %params) = @_; |
308 | 311 |
|
312 |
$::request->{layout}->use_javascript("${_}.js") for qw(ckeditor/ckeditor ckeditor/adapters/jquery); |
|
313 |
|
|
309 | 314 |
my $letter = $self->letter; |
310 | 315 |
|
311 | 316 |
$params{title} ||= t8('Edit Letter'); |
SL/DB/Letter.pm | ||
---|---|---|
1 |
# This file has been auto-generated only because it didn't exist. |
|
2 |
# Feel free to modify it at will; it will not be overwritten automatically. |
|
3 |
|
|
4 | 1 |
package SL::DB::Letter; |
5 | 2 |
|
6 | 3 |
use strict; |
7 | 4 |
|
5 |
use SL::DB::Helper::AttrHTML; |
|
8 | 6 |
use SL::DB::MetaSetup::Letter; |
9 | 7 |
use SL::DB::Manager::Letter; |
10 | 8 |
|
... | ... | |
19 | 17 |
|
20 | 18 |
__PACKAGE__->meta->initialize; |
21 | 19 |
|
20 |
__PACKAGE__->attr_html('body'); |
|
21 |
|
|
22 | 22 |
sub new_from_draft { |
23 | 23 |
my ($class, $draft) = @_; |
24 | 24 |
|
SL/DB/LetterDraft.pm | ||
---|---|---|
1 |
# This file has been auto-generated only because it didn't exist. |
|
2 |
# Feel free to modify it at will; it will not be overwritten automatically. |
|
3 |
|
|
4 | 1 |
package SL::DB::LetterDraft; |
5 | 2 |
|
6 | 3 |
use strict; |
7 | 4 |
|
5 |
use SL::DB::Helper::AttrHTML; |
|
8 | 6 |
use SL::DB::MetaSetup::LetterDraft; |
9 | 7 |
|
10 | 8 |
__PACKAGE__->meta->initialize; |
11 | 9 |
|
10 |
__PACKAGE__->attr_html('body'); |
|
11 |
|
|
12 | 12 |
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. |
13 | 13 |
__PACKAGE__->meta->make_manager_class; |
14 | 14 |
|
sql/Pg-upgrade2/use_html_in_letter.pl | ||
---|---|---|
1 |
# @tag: use_html_in_letter |
|
2 |
# @description: Briefe: HTML für Body nutzen können |
|
3 |
# @depends: letter letter_draft |
|
4 |
package SL::DBUpgrade2::use_html_in_letter; |
|
5 |
|
|
6 |
use strict; |
|
7 |
use utf8; |
|
8 |
|
|
9 |
use SL::DBUtils; |
|
10 |
|
|
11 |
use parent qw(SL::DBUpgrade2::Base); |
|
12 |
|
|
13 |
sub run { |
|
14 |
my ($self) = @_; |
|
15 |
|
|
16 |
$self->convert_column_to_html($_, 'body') for qw(letter letter_draft); |
|
17 |
|
|
18 |
return 1; |
|
19 |
} |
|
20 |
|
|
21 |
1; |
templates/webpages/letter/edit.html | ||
---|---|---|
69 | 69 |
<tr> |
70 | 70 |
<tr> |
71 | 71 |
<th align=right>[% 'Body' | $T8 %]</th> |
72 |
<td><textarea name='letter.body' style='width:100%' rows=20>[% letter.body | html %]</textarea></td>
|
|
72 |
<td>[% L.textarea_tag('letter.body_as_restricted_html', letter.body_as_restricted_html, style='width:100%', rows=20, class="texteditor") %]</td>
|
|
73 | 73 |
</tr> |
74 | 74 |
<tr height=10></tr> |
75 | 75 |
<th align=right>[% 'Internal Notes' | $T8 %]</th> |
Auch abrufbar als: Unified diff
Brieffunktion: Verwendung von HTML im Body