mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-21 19:34:54 +02:00
Fixed tristate inputs (used for permissions input)
This commit is contained in:
parent
f06ad01eb2
commit
9ed487c629
7 changed files with 67 additions and 35 deletions
|
@ -97,6 +97,9 @@ class PermissionType extends AbstractType
|
|||
'mapped' => false,
|
||||
'label' => $operation['label'] ?? null,
|
||||
'disabled' => $options['disabled'],
|
||||
'label_attr' => [
|
||||
'class' => 'checkbox-inline opacity-100',
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
@ -174,6 +174,7 @@ final class TriStateCheckboxType extends AbstractType implements DataTransformer
|
|||
case '':
|
||||
return false;
|
||||
case 'indeterminate':
|
||||
case 'null':
|
||||
return null;
|
||||
default:
|
||||
throw new InvalidArgumentException('Invalid value encountered!: '.$value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue