- my ($attributes, $name) = @_;
- SL::Presenter::Tag::_set_id_attribute($attributes, $name);
-}
-
-sub img_tag {
- my ($self, %options) = _hashify(1, @_);
-
- $options{alt} ||= '';
-
- 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 checkbox_tag {
- my ($self, $name, %attributes) = _hashify(2, @_);
-
- _set_id_attribute(\%attributes, $name);
- $attributes{value} = 1 unless defined $attributes{value};
- my $label = delete $attributes{label};
- my $checkall = delete $attributes{checkall};
-
- if ($attributes{checked}) {
- $attributes{checked} = 'checked';
- } else {
- delete $attributes{checked};
- }
-
- my $code = $self->html_tag('input', undef, %attributes, name => $name, type => 'checkbox');
- $code .= $self->html_tag('label', $label, for => $attributes{id}) if $label;
- $code .= $self->javascript(qq|\$('#$attributes{id}').checkall('$checkall');|) if $checkall;
-
- return $code;
-}
-
-sub radio_button_tag {
- my ($self, $name, %attributes) = _hashify(2, @_);
-
- _set_id_attribute(\%attributes, $name);
- $attributes{value} = 1 unless exists $attributes{value};
- my $label = delete $attributes{label};
-
- if ($attributes{checked}) {
- $attributes{checked} = 'checked';
- } else {
- delete $attributes{checked};
- }
-
- my $code = $self->html_tag('input', undef, %attributes, name => $name, type => 'radio');
- $code .= $self->html_tag('label', $label, for => $attributes{id}) if $label;
-
- return $code;
-}
-
-sub hidden_tag {
- my ($self, $name, $value, %attributes) = _hashify(3, @_);
- return $self->input_tag($name, $value, %attributes, type => 'hidden');
-}
-
-sub div_tag {
- my ($self, $content, @slurp) = @_;
- return $self->html_tag('div', $content, @slurp);