X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/abde405dfaab376a13e9a1e3e24cd715fa7de024..1ec0f541eb70afb7b2058acf9d6847e6e6e21dff:/SL/Template/Plugin/L.pm?ds=sidebyside diff --git a/SL/Template/Plugin/L.pm b/SL/Template/Plugin/L.pm index 0b4967d34..f6a3fd804 100644 --- a/SL/Template/Plugin/L.pm +++ b/SL/Template/Plugin/L.pm @@ -252,6 +252,14 @@ sub options_for_select { 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'); @@ -629,6 +637,13 @@ L function. If C<$options_string> is an array reference then it will be passed to L automatically. +=item C + +Creates a HTML 'select' tag with the two entries C and C by +calling L and L. C<$value> determines +which entry is selected. The C<%attributes> are passed through to +L. + =item C Creates a HTML 'input type=text' tag named C<$name> with the value