Revision 003ccb5a
Von Cem Aydin vor mehr als 1 Jahr hinzugefügt
SL/Presenter/MaterialComponents.pm | ||
---|---|---|
13 | 13 |
our @EXPORT_OK = qw( |
14 | 14 |
button_tag |
15 | 15 |
input_tag |
16 |
textarea_tag |
|
16 | 17 |
date_tag |
17 | 18 |
submit_tag |
18 | 19 |
icon |
... | ... | |
231 | 232 |
); |
232 | 233 |
} |
233 | 234 |
|
235 |
sub textarea_tag { |
|
236 |
my ($name, $value, %attributes) = @_; |
|
237 |
|
|
238 |
_set_id_attribute(\%attributes, $attributes{name}); |
|
239 |
|
|
240 |
my $class = delete $attributes{class}; |
|
241 |
my $icon = $attributes{icon} |
|
242 |
? icon(delete $attributes{icon}, class => 'prefix') |
|
243 |
: ''; |
|
244 |
|
|
245 |
my $label = $attributes{label} |
|
246 |
? html_tag('label', delete $attributes{label}, for => $attributes{id}) |
|
247 |
: ''; |
|
248 |
|
|
249 |
html_tag('div', |
|
250 |
$icon . |
|
251 |
html_tag('textarea', $value, class => 'materialize-textarea', %attributes, name => $name) . |
|
252 |
$label, |
|
253 |
class => [ grep $_, $class, INPUT_FIELD ], |
|
254 |
); |
|
255 |
} |
|
256 |
|
|
234 | 257 |
sub date_tag { |
235 | 258 |
my ($name, $value, %attributes) = @_; |
236 | 259 |
|
Auch abrufbar als: Unified diff
Mobile Design: MaterialComponents Presenter textarea input hinzugefügt