Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision e8e75f56

Von Hans Peter Schlaepfer vor mehr als 3 Jahren hinzugefügt

  • ID e8e75f56f771da089bc37d19f88b84bfab74cd9a
  • Vorgänger 25663f29
  • Nachfolger 75c6df82

Design 4.0: Presenter button_tag: input und button unterscheiden

Unterschiede anzeigen:

SL/Presenter/Tag.pm
264 264

  
265 265
  _set_id_attribute(\%attributes, $attributes{name}) if $attributes{name};
266 266
  $attributes{type} ||= 'button';
267
  $attributes{tag}  ||= 'input';
267 268

  
268 269
  $onclick = 'if (!confirm("'. _J(delete($attributes{confirm})) .'")) return false; ' . $onclick if $attributes{confirm};
269 270

  
270
  html_tag('input', undef, %attributes, value => $value, onclick => $onclick);
271
  if ( $attributes{tag} == 'input' ) {
272
    html_tag('input', undef, %attributes, value => $value, onclick => $onclick);
273
  }
274
  elsif ( $attributes{tag} == 'button' ) {
275
    html_tag('button', undef, %attributes, value => $value, onclick => $onclick);
276
  }
271 277
}
272 278

  
273 279
sub submit_tag {

Auch abrufbar als: Unified diff