Revision 86eed232
Von Sven Schöling vor mehr als 7 Jahren hinzugefügt
SL/Presenter/Tag.pm | ||
---|---|---|
our @EXPORT_OK = qw(
|
||
html_tag input_tag hidden_tag javascript man_days_tag name_to_id select_tag
|
||
checkbox_tag button_tag submit_tag ajax_submit_tag input_number_tag
|
||
stringify_attributes restricted_html link
|
||
stringify_attributes restricted_html textarea_tag link
|
||
);
|
||
our %EXPORT_TAGS = (ALL => \@EXPORT_OK);
|
||
|
||
... | ... | |
return $html_restricter->process($value);
|
||
}
|
||
|
||
sub textarea_tag {
|
||
my ($name, $content, %attributes) = @_;
|
||
|
||
_set_id_attribute(\%attributes, $name);
|
||
$attributes{rows} *= 1; # required by standard
|
||
$attributes{cols} *= 1; # required by standard
|
||
|
||
html_tag('textarea', $content, %attributes, name => $name);
|
||
}
|
||
|
||
sub link {
|
||
my ($href, $content, %params) = @_;
|
||
|
SL/Template/Plugin/L.pm | ||
---|---|---|
sub ajax_submit_tag { return _call_presenter('ajax_submit_tag', @_); }
|
||
sub link { return _call_presenter('link', @_); }
|
||
sub input_number_tag { return _call_presenter('input_number_tag', @_); }
|
||
sub textarea_tag { return _call_presenter('textarea_tag', @_); }
|
||
|
||
sub _set_id_attribute {
|
||
my ($attributes, $name, $unique) = @_;
|
||
... | ... | |
return $self->html_tag('img', undef, %options);
|
||
}
|
||
|
||
sub textarea_tag {
|
||
my ($self, $name, $content, %attributes) = _hashify(3, @_);
|
||
|
||
_set_id_attribute(\%attributes, $name);
|
||
$attributes{rows} *= 1; # required by standard
|
||
$attributes{cols} *= 1; # required by standard
|
||
$content = $content ? _H($content) : '';
|
||
|
||
return $self->html_tag('textarea', $content, %attributes, name => $name);
|
||
}
|
||
|
||
sub radio_button_tag {
|
||
my ($self, $name, %attributes) = _hashify(2, @_);
|
||
|
Auch abrufbar als: Unified diff
Presenter::Tag: textarea_tag aus Plugin/L verschoben