- Fixed a bug caused by JsonSerialization and old code accessing attributes.

- Fixed Checkbox and Radio checked using a 4th option parameter
This commit is contained in:
Dave Mc Nicoll committed 2020-04-09 14:35:24 -04:00
1 parent 23e8eb71f6
commit 48536ab11d
4 files changed
+51 -22

No files matched your search

+16 -5
View File
@@ -4,10 +4,21 @@ namespace Picea\Ui\Form;
class UiRadio extends UiInput {
public string $token = "ui.radio";
public string $token = "ui.radio";
public array $attributes = [
'class' => "ui-radio",
'type' => "radio",
];
public array $attributes = [
'class' => "ui-radio",
'type' => "radio",
];
protected function objectAttribute() : array
{
if ( $this->options['value'] ?? false && ( $this->options['value'] === $this->value ) ) {
return [
'checked' => "checked"
];
}
return [];
}
}