Better messaging

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2022-02-09 16:30:42 -08:00
parent 7794c2f44b
commit b9a8d45c07

View file

@ -141,11 +141,15 @@ class CustomFieldsController extends Controller
if ($field->fieldset()->detach($fieldset_id)) {
return redirect()->route('fieldsets.show', ['fieldset' => $fieldset_id])
->with("success", trans('admin/custom_fields/message.field.delete.success'));
}
} else {
return redirect()->back()->withErrors(['message' => "Field is in use and cannot be deleted."]);
}
}
return redirect()->back()->withErrors(['message' => "Error deleting field from fieldset"]);
}
/**