Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 50cd4bda

Von Sven Schöling vor mehr als 10 Jahren hinzugefügt

L.radio_button_tag: id erhalten wenn sie schon vorher gesetzt ist.

Unterschiede anzeigen:

SL/Presenter/Tag.pm
}
sub _set_id_attribute {
my ($attributes, $name) = @_;
my ($attributes, $name, $unique) = @_;
$attributes->{id} = name_to_id(undef, $name) if !delete($attributes->{no_id}) && !$attributes->{id};
if (!delete($attributes->{no_id}) && !$attributes->{id}) {
$attributes->{id} = name_to_id(undef, $name);
$attributes->{id} .= '_' . $attributes->{value} if $unique;
}
return %{ $attributes };
}
SL/Template/Plugin/L.pm
sub part_picker { return _call_presenter('part_picker', @_); }
sub _set_id_attribute {
my ($attributes, $name) = @_;
SL::Presenter::Tag::_set_id_attribute($attributes, $name);
my ($attributes, $name, $unique) = @_;
SL::Presenter::Tag::_set_id_attribute($attributes, $name, $unique);
}
sub img_tag {
......
sub radio_button_tag {
my ($self, $name, %attributes) = _hashify(2, @_);
_set_id_attribute(\%attributes, $name);
$attributes{value} = 1 unless exists $attributes{value};
$attributes{id} .= '_' . $attributes{value};
_set_id_attribute(\%attributes, $name, 1);
my $label = delete $attributes{label};
if ($attributes{checked}) {

Auch abrufbar als: Unified diff