Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 4a6e88d8

Von Hans Peter Schlaepfer vor etwa 6 Jahren hinzugefügt

  • ID 4a6e88d8b8f5617843a643e60eb85a9259a96311
  • Vorgänger eef2092a
  • Nachfolger 2cc99c15

Design 4.0: Presenter button_tag: input und button unterscheiden

Unterschiede anzeigen:

SL/Presenter/Tag.pm
239 239

  
240 240
  _set_id_attribute(\%attributes, $attributes{name}) if $attributes{name};
241 241
  $attributes{type} ||= 'button';
242
  $attributes{tag}  ||= 'input';
242 243

  
243 244
  $onclick = 'if (!confirm("'. _J(delete($attributes{confirm})) .'")) return false; ' . $onclick if $attributes{confirm};
244 245

  
245
  html_tag('input', undef, %attributes, value => $value, onclick => $onclick);
246
  if ( $attributes{tag} == 'input' ) {
247
    html_tag('input', undef, %attributes, value => $value, onclick => $onclick);
248
  }
249
  elsif ( $attributes{tag} == 'button' ) {
250
    html_tag('button', undef, %attributes, value => $value, onclick => $onclick);
251
  }
246 252
}
247 253

  
248 254
sub submit_tag {

Auch abrufbar als: Unified diff