Skip to content

Commit 5be77ec

Browse files
committed
fix: improve blueprint layouts (closes #119)
1 parent 16776f7 commit 5be77ec

File tree

4 files changed

+10
-17
lines changed

4 files changed

+10
-17
lines changed

blueprints/fields/key.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
label: dreamform.common.key.label
22
type: slug
33
required: true
4-
width: 1/3
4+
width: 1/2
55
icon: false # none would show an empty icon which cuts of the input too early
66
wizard:
77
field: label

classes/Fields/FileUploadField.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,17 @@ public static function blueprint(): array
4343
'validation' => [
4444
'label' => t('dreamform.validation'),
4545
'fields' => [
46+
'required' => 'dreamform/fields/required',
4647
'maxSize' => [
4748
'label' => t('dreamform.fields.upload.maxSize.label'),
4849
'type' => 'number',
4950
'help' => tt('dreamform.fields.upload.maxSize.help', null, ['size' => ini_get('upload_max_filesize')]),
5051
'after' => 'MB',
51-
'width' => '1/4',
52+
'width' => '1/2',
5253
],
5354
'allowedTypes' => [
5455
'label' => t('dreamform.fields.upload.allowedTypes.label'),
5556
'type' => 'multiselect',
56-
'width' => '3/4',
5757
'options' => A::map(
5858
array_keys(static::availableTypes()),
5959
fn ($type) => [
@@ -62,7 +62,6 @@ public static function blueprint(): array
6262
]
6363
)
6464
],
65-
'required' => 'dreamform/fields/required',
6665
'errorMessage' => 'dreamform/fields/error-message',
6766
]
6867
]

classes/Fields/NumberField.php

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,13 @@ public static function blueprint(): array
2121
'fields' => [
2222
'key' => 'dreamform/fields/key',
2323
'label' => 'dreamform/fields/label',
24-
'placeholder' => [
25-
'extends' => 'dreamform/fields/placeholder',
26-
'width' => '2/3'
27-
],
24+
'placeholder' => 'dreamform/fields/placeholder',
2825
'step' => [
2926
'label' => t('dreamform.fields.number.step.label'),
3027
'type' => 'number',
3128
'default' => 1,
3229
'required' => true,
33-
'width' => '1/3',
30+
'width' => '1/2',
3431
'help' => t('dreamform.fields.number.step.help')
3532
],
3633
]
@@ -41,18 +38,15 @@ public static function blueprint(): array
4138
'min' => [
4239
'label' => t('dreamform.fields.number.min.label'),
4340
'type' => 'number',
44-
'width' => '1/3'
41+
'width' => '1/2'
4542
],
4643
'max' => [
4744
'label' => t('dreamform.fields.number.max.label'),
4845
'type' => 'number',
49-
'width' => '1/3'
46+
'width' => '1/2'
5047
],
5148
'required' => 'dreamform/fields/required',
52-
'errorMessage' => [
53-
'extends' => 'dreamform/fields/error-message',
54-
'width' => '1'
55-
],
49+
'errorMessage' => 'dreamform/fields/error-message',
5650
]
5751
]
5852
]

classes/Fields/PagesField.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ public static function blueprint(): array
2626
'label' => t('dreamform.common.options.label'),
2727
'type' => 'pages',
2828
'query' => DreamForm::option('fields.pages.query'),
29-
'width' => '2/3',
29+
'width' => '1/2',
3030
],
3131
'useChildren' => [
3232
'label' => t('dreamform.fields.pages.useChildren.label'),
3333
'help' => t('dreamform.fields.pages.useChildren.help'),
3434
'type' => 'toggle',
3535
'default' => false,
36-
'width' => '1/3',
36+
'width' => '1/2',
3737
],
3838
]
3939
],

0 commit comments

Comments
 (0)