File tree Expand file tree Collapse file tree 4 files changed +11
-67
lines changed
Expand file tree Collapse file tree 4 files changed +11
-67
lines changed Original file line number Diff line number Diff line change 44
55use Backstage \Fields \Contracts \FieldContract ;
66use Backstage \Fields \Fields \FormSchemas \BasicSettingsSchema ;
7- use Backstage \Fields \Fields \FormSchemas \ConditionalLogicSchema ;
87use Backstage \Fields \Fields \FormSchemas \ValidationRulesSchema ;
98use Backstage \Fields \Fields \FormSchemas \VisibilityRulesSchema ;
109use Backstage \Fields \Fields \Logic \ConditionalLogicApplier ;
@@ -26,7 +25,6 @@ public function getRulesForm(): array
2625 return [
2726 Forms \Components \Grid::make (2 )
2827 ->schema ([
29- ...ConditionalLogicSchema::make (),
3028 ...ValidationRulesSchema::make (),
3129 ...VisibilityRulesSchema::make (),
3230 ]),
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -10,7 +10,11 @@ class ValidationRulesSchema
1010 public static function make (): array
1111 {
1212 return [
13- Forms \Components \Fieldset::make ('Validation rules ' )
13+ Forms \Components \Section::make ('Validation rules ' )
14+ ->collapsible ()
15+ ->collapsed (false )
16+ ->compact (true )
17+ ->description (__ ('Validate the value of this field based on the rules below ' ))
1418 ->schema ([
1519 Forms \Components \Repeater::make ('config.validationRules ' )
1620 ->hiddenLabel ()
Original file line number Diff line number Diff line change @@ -10,7 +10,11 @@ class VisibilityRulesSchema
1010 public static function make (): array
1111 {
1212 return [
13- Forms \Components \Fieldset::make ('Visibility rules ' )
13+ Forms \Components \Section::make ('Visibility rules ' )
14+ ->collapsible ()
15+ ->collapsed (false )
16+ ->compact (true )
17+ ->description (__ ('Show or hide this field based on the value of another field ' ))
1418 ->schema ([
1519 Forms \Components \Repeater::make ('config.visibilityRules ' )
1620 ->hiddenLabel ()
@@ -44,6 +48,7 @@ public static function make(): array
4448 ->required (),
4549 Forms \Components \Select::make ('operator ' )
4650 ->label (__ ('Condition ' ))
51+ ->live ()
4752 ->options ([
4853 'equals ' => __ ('Equals ' ),
4954 'not_equals ' => __ ('Does not equal ' ),
You can’t perform that action at this time.
0 commit comments