mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Merge pull request #13528 from inietov/fixes/cloning_model_blanks_fieldset
Fixed #12548 Cloning a model blanks fieldset of new one
This commit is contained in:
commit
22d136df46
|
@ -286,6 +286,7 @@ class AssetModelsController extends Controller
|
||||||
return view('models/edit')
|
return view('models/edit')
|
||||||
->with('depreciation_list', Helper::depreciationList())
|
->with('depreciation_list', Helper::depreciationList())
|
||||||
->with('item', $model)
|
->with('item', $model)
|
||||||
|
->with('model_id', $model_to_clone->id)
|
||||||
->with('clone_model', $model_to_clone);
|
->with('clone_model', $model_to_clone);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Custom Fieldset -->
|
<!-- Custom Fieldset -->
|
||||||
@livewire('custom-field-set-default-values-for-model',["model_id" => $item->id])
|
<!-- If $item->id is null we are cloning the model and we need the $model_id variable -->
|
||||||
|
@livewire('custom-field-set-default-values-for-model',["model_id" => ($item->id) ? $item->id : $model_id])
|
||||||
|
|
||||||
@include ('partials.forms.edit.notes')
|
@include ('partials.forms.edit.notes')
|
||||||
@include ('partials.forms.edit.requestable', ['requestable_text' => trans('admin/models/general.requestable')])
|
@include ('partials.forms.edit.requestable', ['requestable_text' => trans('admin/models/general.requestable')])
|
||||||
|
|
Loading…
Reference in a new issue