return $code;
}
+sub yes_no_tag {
+ my ($self, $name, $value) = splice @_, 0, 3;
+ my %attributes = _hashify(@_);
+
+ my $options = $self->options_for_select([ [ 1, $::locale->text('Yes') ], [ 0, $::locale->text('No') ] ], default => $value ? 1 : 0);
+ return $self->select_tag($name, $options, %attributes);
+}
+
sub javascript {
my ($self, $data) = @_;
return $self->html_tag('script', $data, type => 'text/javascript');
reference then it will be passed to L</options_for_select>
automatically.
+=item C<yes_no_tag $name, $value, %attributes>
+
+Creates a HTML 'select' tag with the two entries C<yes> and C<no> by
+calling L<select_tag> and L<options_for_select>. C<$value> determines
+which entry is selected. The C<%attributes> are passed through to
+L<select_tag>.
+
=item C<input_tag $name, $value, %attributes>
Creates a HTML 'input type=text' tag named C<$name> with the value