From 7ebb7876c4204f59e9c01be03414b6cd2da561de Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 19 Jul 2018 10:39:54 -0700 Subject: [PATCH] Partial fix for #5896 Still need to fix the front end on edit, which seems to be defaulting to boolean --- app/Http/Controllers/CustomFieldsController.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Http/Controllers/CustomFieldsController.php b/app/Http/Controllers/CustomFieldsController.php index aa26985f1..62f2cf32f 100644 --- a/app/Http/Controllers/CustomFieldsController.php +++ b/app/Http/Controllers/CustomFieldsController.php @@ -87,7 +87,7 @@ class CustomFieldsController extends Controller ]); - if (!in_array(Input::get('format'), array_keys(CustomField::$PredefinedFormats))) { + if ($request->has("custom_format")) { $field->format = e($request->get("custom_format")); } else { $field->format = e($request->get("format")); @@ -96,7 +96,6 @@ class CustomFieldsController extends Controller if ($field->save()) { return redirect()->route("fields.index")->with("success", trans('admin/custom_fields/message.field.create.success')); } else { - // dd($field); return redirect()->back()->withInput()->with('error', trans('admin/custom_fields/message.field.create.error')); }