Revision 4edfabd2
Von Sven Schöling vor fast 14 Jahren hinzugefügt
SL/Template/Plugin/L.pm | ||
---|---|---|
$attributes{id} ||= $self->name_to_id($name);
|
||
$attributes{value} = 1 unless defined $attributes{value};
|
||
my $label = delete $attributes{label};
|
||
my $checkall = delete $attributes{checkall};
|
||
|
||
if ($attributes{checked}) {
|
||
$attributes{checked} = 'checked';
|
||
... | ... | |
|
||
my $code = $self->html_tag('input', undef, %attributes, name => $name, type => 'checkbox');
|
||
$code .= $self->html_tag('label', $label, for => $attributes{id}) if $label;
|
||
$code .= $self->javascript(qq|\$('#$attributes{id}').checkall('$checkall');|) if $checkall;
|
||
|
||
return $code;
|
||
}
|
||
... | ... | |
created with said C<label>. No attribute named C<label> is created in
|
||
that case.
|
||
|
||
If C<%attributes> contains a key C<checkall> then the value is taken as a
|
||
JQuery selector and clicking this checkbox will also toggle all checkboxes
|
||
matching the selector.
|
||
|
||
=item C<date_tag $name, $value, cal_align =E<gt> $align_code, %attributes>
|
||
|
||
Creates a date input field, with an attached javascript that will open a
|
Auch abrufbar als: Unified diff
checkall attribut in L.checkbox_tag