Revision bd1e1e7d
Von Sven Schöling vor mehr als 13 Jahren hinzugefügt
SL/Template/Plugin/L.pm | ||
---|---|---|
my ($self, $onclick, $value, @slurp) = @_;
|
||
my %attributes = _hashify(@slurp);
|
||
|
||
return $self->input_tag(undef, $value, %attributes, type => 'button', onclick => $onclick);
|
||
$attributes{id} ||= $self->name_to_id($attributes{name}) if $attributes{name};
|
||
$attributes{type} ||= 'button';
|
||
|
||
return $self->html_tag('input', undef, %attributes, value => $value, onclick => $onclick);
|
||
}
|
||
|
||
sub options_for_select {
|
Auch abrufbar als: Unified diff
button_tag nicht als input_tag implementieren
Hintergrund: button tags brauchen im standard kein id oder name Attribut, input
tags aber schon. Die input_tag Implementierung forciert korrekterweise id und
name, so dass die leer sind, wenn ein button_tag ohne geschrieben wird.