Skip to content

Commit

Permalink
Role field: always use radio input
Browse files Browse the repository at this point in the history
  • Loading branch information
distantnative committed Sep 7, 2024
1 parent 3540d33 commit 54481de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Panel/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,9 @@ public static function role(
]);

return array_merge([
'label' => I18n::translate('role'),
'type' => count($roles) <= 1 ? 'hidden' : 'radio',
'options' => $roles
'label' => I18n::translate('role'),
'type' => count($roles) === 0 ? 'hidden' : 'radio',
'options' => $roles
], $props);
}

Expand Down

0 comments on commit 54481de

Please sign in to comment.