Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision bd1e1e7d

Von Sven Schöling vor fast 13 Jahren hinzugefügt

  • ID bd1e1e7d4bc019cc97b60d4a946531c356c45fde
  • Vorgänger 993ce983
  • Nachfolger b28312f7

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.

Unterschiede anzeigen:

SL/Template/Plugin/L.pm
196 196
  my ($self, $onclick, $value, @slurp) = @_;
197 197
  my %attributes = _hashify(@slurp);
198 198

  
199
  return $self->input_tag(undef, $value, %attributes, type => 'button', onclick => $onclick);
199
  $attributes{id}   ||= $self->name_to_id($attributes{name}) if $attributes{name};
200
  $attributes{type} ||= 'button';
201

  
202
  return $self->html_tag('input', undef, %attributes, value => $value, onclick => $onclick);
200 203
}
201 204

  
202 205
sub options_for_select {

Auch abrufbar als: Unified diff