Revision 86eed232
Von Sven Schöling vor etwa 7 Jahren hinzugefügt
SL/Presenter/Tag.pm | ||
---|---|---|
9 | 9 |
our @EXPORT_OK = qw( |
10 | 10 |
html_tag input_tag hidden_tag javascript man_days_tag name_to_id select_tag |
11 | 11 |
checkbox_tag button_tag submit_tag ajax_submit_tag input_number_tag |
12 |
stringify_attributes restricted_html link |
|
12 |
stringify_attributes restricted_html textarea_tag link
|
|
13 | 13 |
); |
14 | 14 |
our %EXPORT_TAGS = (ALL => \@EXPORT_OK); |
15 | 15 |
|
... | ... | |
312 | 312 |
return $html_restricter->process($value); |
313 | 313 |
} |
314 | 314 |
|
315 |
sub textarea_tag { |
|
316 |
my ($name, $content, %attributes) = @_; |
|
317 |
|
|
318 |
_set_id_attribute(\%attributes, $name); |
|
319 |
$attributes{rows} *= 1; # required by standard |
|
320 |
$attributes{cols} *= 1; # required by standard |
|
321 |
|
|
322 |
html_tag('textarea', $content, %attributes, name => $name); |
|
323 |
} |
|
324 |
|
|
315 | 325 |
sub link { |
316 | 326 |
my ($href, $content, %params) = @_; |
317 | 327 |
|
SL/Template/Plugin/L.pm | ||
---|---|---|
80 | 80 |
sub ajax_submit_tag { return _call_presenter('ajax_submit_tag', @_); } |
81 | 81 |
sub link { return _call_presenter('link', @_); } |
82 | 82 |
sub input_number_tag { return _call_presenter('input_number_tag', @_); } |
83 |
sub textarea_tag { return _call_presenter('textarea_tag', @_); } |
|
83 | 84 |
|
84 | 85 |
sub _set_id_attribute { |
85 | 86 |
my ($attributes, $name, $unique) = @_; |
... | ... | |
94 | 95 |
return $self->html_tag('img', undef, %options); |
95 | 96 |
} |
96 | 97 |
|
97 |
sub textarea_tag { |
|
98 |
my ($self, $name, $content, %attributes) = _hashify(3, @_); |
|
99 |
|
|
100 |
_set_id_attribute(\%attributes, $name); |
|
101 |
$attributes{rows} *= 1; # required by standard |
|
102 |
$attributes{cols} *= 1; # required by standard |
|
103 |
$content = $content ? _H($content) : ''; |
|
104 |
|
|
105 |
return $self->html_tag('textarea', $content, %attributes, name => $name); |
|
106 |
} |
|
107 |
|
|
108 | 98 |
sub radio_button_tag { |
109 | 99 |
my ($self, $name, %attributes) = _hashify(2, @_); |
110 | 100 |
|
Auch abrufbar als: Unified diff
Presenter::Tag: textarea_tag aus Plugin/L verschoben