diff --git a/resources/js/components/fields/Settings.vue b/resources/js/components/fields/Settings.vue index b33709b7e3..68c23c45d2 100644 --- a/resources/js/components/fields/Settings.vue +++ b/resources/js/components/fields/Settings.vue @@ -53,53 +53,14 @@ >
- - - - - - - -
diff --git a/src/Http/Controllers/CP/Fields/FieldsController.php b/src/Http/Controllers/CP/Fields/FieldsController.php index fd21391aef..503201e42a 100644 --- a/src/Http/Controllers/CP/Fields/FieldsController.php +++ b/src/Http/Controllers/CP/Fields/FieldsController.php @@ -70,6 +70,38 @@ public function update(Request $request) protected function blueprint($blueprint) { - return $blueprint->ensureField('listable', ['type' => 'select', 'cast_booleans' => true]); + $prepends = collect([ + 'display' => [ + 'type' => 'text', + 'instructions' => __('statamic::messages.fields_display_instructions'), + 'width' => 50, + ], + 'handle' => [ + 'type' => 'text', + 'instructions' => __('statamic::messages.fields_handle_instructions'), + 'width' => 50, + ], + 'instructions' => [ + 'type' => 'text', + 'instructions' => __('statamic::messages.fields_instructions_instructions'), + ], + 'listable' => [ + 'type' => 'select', + 'instructions' => __('statamic::messages.fields_listable_instructions'), + 'cast_booleans' => true, + 'width' => 50, + 'options' => [ + 'hidden' => __('Hidden by default'), + 'true' => __('Yes'), + 'false' => __('No'), + ], + ] + ]); + + foreach ($prepends->reverse() as $handle => $prepend) { + $blueprint->ensureFieldPrepended($handle, $prepend); + } + + return $blueprint; } }