X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/0959c4afa29a4bab16f405e016f06d18fb4ecb23..015d45ca807ddd6ba6e6a87e11ab8cda6250baad:/SL/Presenter/MaterialComponents.pm diff --git a/SL/Presenter/MaterialComponents.pm b/SL/Presenter/MaterialComponents.pm index a4eacc8d3..6259fe446 100644 --- a/SL/Presenter/MaterialComponents.pm +++ b/SL/Presenter/MaterialComponents.pm @@ -285,6 +285,22 @@ sub select_tag { ); } +sub checkbox_tag { + my ($name, %attributes) = @_; + + _set_id_attribute(\%attributes, $name); + + my $label = $attributes{label} + ? html_tag('span', delete $attributes{label}) + : ''; + + my $checkbox_html = SL::Presenter::Tag::checkbox_tag($name, %attributes); + + html_tag('label', + $checkbox_html . $label, + ); +} + 1; __END__