mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 14:27:33 -08:00
Fixed #12724 - fieldset not saving on model
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
13ad69ee75
commit
e869b1fd53
|
@ -82,8 +82,8 @@ class AssetModelsController extends Controller
|
||||||
$model->user_id = Auth::id();
|
$model->user_id = Auth::id();
|
||||||
$model->requestable = Request::has('requestable');
|
$model->requestable = Request::has('requestable');
|
||||||
|
|
||||||
if ($request->input('custom_fieldset') != '') {
|
if ($request->input('fieldset_id') != '') {
|
||||||
$model->fieldset_id = e($request->input('custom_fieldset'));
|
$model->fieldset_id = e($request->input('fieldset_id'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$model = $request->handleImages($model);
|
$model = $request->handleImages($model);
|
||||||
|
@ -160,10 +160,10 @@ class AssetModelsController extends Controller
|
||||||
|
|
||||||
$this->removeCustomFieldsDefaultValues($model);
|
$this->removeCustomFieldsDefaultValues($model);
|
||||||
|
|
||||||
if ($request->input('custom_fieldset') == '') {
|
if ($request->input('fieldset_id') == '') {
|
||||||
$model->fieldset_id = null;
|
$model->fieldset_id = null;
|
||||||
} else {
|
} else {
|
||||||
$model->fieldset_id = $request->input('custom_fieldset');
|
$model->fieldset_id = $request->input('fieldset_id');
|
||||||
|
|
||||||
if ($this->shouldAddDefaultValues($request->input())) {
|
if ($this->shouldAddDefaultValues($request->input())) {
|
||||||
if (!$this->assignCustomFieldsDefaultValues($model, $request->input('default_values'))){
|
if (!$this->assignCustomFieldsDefaultValues($model, $request->input('default_values'))){
|
||||||
|
@ -444,7 +444,7 @@ class AssetModelsController extends Controller
|
||||||
{
|
{
|
||||||
return ! empty($input['add_default_values'])
|
return ! empty($input['add_default_values'])
|
||||||
&& ! empty($input['default_values'])
|
&& ! empty($input['default_values'])
|
||||||
&& ! empty($input['custom_fieldset']);
|
&& ! empty($input['fieldset_id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue