src/Grid/Displayers/Checkbox.php 1 location
|
@@ 27-36 (lines=10) @@
|
24 |
|
$this->value = $this->value->toArray(); |
25 |
|
} |
26 |
|
|
27 |
|
foreach ($options as $value => $label) { |
28 |
|
$checked = in_array($value, $this->value) ? 'checked' : ''; |
29 |
|
$radios .= <<<EOT |
30 |
|
<div class="checkbox"> |
31 |
|
<label> |
32 |
|
<input type="checkbox" name="grid-checkbox-{$name}[]" value="{$value}" $checked />{$label} |
33 |
|
</label> |
34 |
|
</div> |
35 |
|
EOT; |
36 |
|
} |
37 |
|
|
38 |
|
Admin::script($this->script()); |
39 |
|
|
src/Grid/Displayers/Radio.php 1 location
|
@@ 18-27 (lines=10) @@
|
15 |
|
$radios = ''; |
16 |
|
$name = $this->column->getName(); |
17 |
|
|
18 |
|
foreach ($options as $value => $label) { |
19 |
|
$checked = ($value == $this->value) ? 'checked' : ''; |
20 |
|
$radios .= <<<EOT |
21 |
|
<div class="radio"> |
22 |
|
<label> |
23 |
|
<input type="radio" name="grid-radio-$name" value="{$value}" $checked />{$label} |
24 |
|
</label> |
25 |
|
</div> |
26 |
|
EOT; |
27 |
|
} |
28 |
|
|
29 |
|
Admin::script($this->script()); |
30 |
|
|