Revision a30ad33e
Von Moritz Bunkus vor fast 14 Jahren hinzugefügt
SL/Template/Plugin/L.pm | ||
---|---|---|
148 | 148 |
} |
149 | 149 |
|
150 | 150 |
sub submit_tag { |
151 |
return shift->input_tag(@_, type => 'submit', class => 'submit'); |
|
151 |
my $self = shift; |
|
152 |
my $name = shift; |
|
153 |
my $value = shift; |
|
154 |
my %attributes = _hashify(@_); |
|
155 |
|
|
156 |
$attributes{onclick} = "if (confirm('" . delete($attributes{confirm}) . "')) return true; else return false;" if $attributes{confirm}; |
|
157 |
|
|
158 |
return $self->input_tag($name, $value, %attributes, type => 'submit', class => 'submit'); |
|
152 | 159 |
} |
153 | 160 |
|
154 | 161 |
sub options_for_select { |
... | ... | |
328 | 335 |
value C<$value> and with arbitrary HTML attributes from C<%attributes>. The |
329 | 336 |
tag's C<id> defaults to C<name_to_id($name)>. |
330 | 337 |
|
338 |
If C<$attributes{confirm}> is set then a JavaScript popup dialog will |
|
339 |
be added via the C<onclick> handler asking the question given with |
|
340 |
C<$attributes{confirm}>. If request is only submitted if the user |
|
341 |
clicks the dialog's ok/yes button. |
|
342 |
|
|
331 | 343 |
=item C<textarea_tag $name, $value, %attributes> |
332 | 344 |
|
333 | 345 |
Creates a HTML 'textarea' tag named C<$name> with the content |
Auch abrufbar als: Unified diff
submit_tag: JavaScript-Confirm erfragen, wenn Parameter confirm gesetzt ist