+ _set_id_attribute(\%attributes, $attributes{name});
+
+ my $class = delete %attributes{class};
+ my $icon = $attributes{icon}
+ ? icon(delete $attributes{icon}, class => 'prefix')
+ : '';
+
+ my $label = $attributes{label}
+ ? html_tag('label', delete $attributes{label}, for => $attributes{id})
+ : '';
+
+ $attributes{type} //= 'text';
+
+ html_tag('div',
+ $icon .
+ html_tag('input', undef, value => $value, %attributes, name => $name) .
+ $label,
+ class => [ grep $_, $class, INPUT_FIELD ],
+ );
+}
+
+sub date_tag {
+ my ($name, $value, %attributes) = @_;
+
+ _set_id_attribute(\%attributes, $name);
+
+ my $icon = $attributes{icon}
+ ? icon(delete $attributes{icon}, class => 'prefix')
+ : '';
+
+ my $label = $attributes{label}
+ ? html_tag('label', delete $attributes{label}, for => $attributes{id})
+ : '';
+
+ $attributes{type} = 'text'; # required for materialize
+
+ my @onchange = $attributes{onchange} ? (onChange => delete $attributes{onchange}) : ();
+ my @classes = (delete $attributes{class});
+
+ $::request->layout->add_javascripts('kivi.Validator.js');
+ $::request->presenter->need_reinit_widgets($attributes{id});
+
+ $attributes{'data-validate'} = join(' ', "date", grep { $_ } (delete $attributes{'data-validate'}));
+
+ html_tag('div',
+ $icon .
+ html_tag('input',
+ blessed($value) ? $value->to_lxoffice : $value,
+ size => 11, type => 'text', name => $name,
+ %attributes,
+ class => DATEPICKER, @onchange,
+ ) .
+ $label,
+ class => [ grep $_, @classes, INPUT_FIELD ],
+ );
+}
+
+sub select_tag {
+ my ($name, $collection, %attributes) = @_;
+
+
+ _set_id_attribute(\%attributes, $name);
+ my @size_classes = _extract_classes(\%attributes, "size");
+
+
+ my $icon = $attributes{icon}
+ ? icon(delete $attributes{icon}, class => 'prefix')
+ : '';
+
+ my $label = $attributes{label}
+ ? html_tag('label', delete $attributes{label}, for => $attributes{id})
+ : '';
+
+ my $select_html = SL::Presenter::Tag::select_tag($name, $collection, %attributes);
+
+ html_tag('div',
+ $icon . $select_html . $label,
+ class => [ INPUT_FIELD, @size_classes ],
+ );
+}
+
+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);