diff --git a/resources/views/custom_fields/fieldsets/view.blade.php b/resources/views/custom_fields/fieldsets/view.blade.php
index d0a42f6c74..8a712e2af6 100644
--- a/resources/views/custom_fields/fieldsets/view.blade.php
+++ b/resources/views/custom_fields/fieldsets/view.blade.php
@@ -57,21 +57,28 @@
{{$field->element}} |
{{ $field->field_encrypted=='1' ? trans('general.yes') : trans('general.no') }} |
+
@if ($field->pivot->required)
-
-
- Required - click to make optional
-
+
+
@else
-
-
- Optional - click to make required
-
+
+
@endif
+
|
@can('update', $custom_fieldset)
- Remove
+
@endcan
|
diff --git a/routes/web/fields.php b/routes/web/fields.php
index a2fedcfd93..aedaa46bd7 100644
--- a/routes/web/fields.php
+++ b/routes/web/fields.php
@@ -7,17 +7,17 @@
Route::group([ 'prefix' => 'fields','middleware' => ['auth'] ], function () {
- Route::get('required/{fieldset_id}/{field_id}',
+ Route::post('required/{fieldset_id}/{field_id}',
['uses' => 'CustomFieldsetsController@makeFieldRequired',
'as' => 'fields.required']
);
- Route::get('optional/{fieldset_id}/{field_id}',
+ Route::post('optional/{fieldset_id}/{field_id}',
['uses' => 'CustomFieldsetsController@makeFieldOptional',
'as' => 'fields.optional']
);
- Route::get('{field_id}/fieldset/{fieldset_id}/disassociate',
+ Route::post('{field_id}/fieldset/{fieldset_id}/disassociate',
['uses' => 'CustomFieldsController@deleteFieldFromFieldset',
'as' => 'fields.disassociate']
);