diff --git a/app/Http/Controllers/Api/AssetModelsController.php b/app/Http/Controllers/Api/AssetModelsController.php index 6fd3677fc7..7ef076710c 100644 --- a/app/Http/Controllers/Api/AssetModelsController.php +++ b/app/Http/Controllers/Api/AssetModelsController.php @@ -76,7 +76,7 @@ class AssetModelsController extends Controller $assetmodel->fill($request->all()); if ($assetmodel->save()) { - return response()->json(Helper::formatStandardApiResponse('success', $assetmodel, trans('admin/assetmodels/message.create.success'))); + return response()->json(Helper::formatStandardApiResponse('success', $assetmodel, trans('admin/models/message.create.success'))); } return response()->json(Helper::formatStandardApiResponse('error', null, $assetmodel->getErrors())); diff --git a/app/Http/Controllers/AssetsController.php b/app/Http/Controllers/AssetsController.php index 1a85aa4e75..30bf8bb209 100755 --- a/app/Http/Controllers/AssetsController.php +++ b/app/Http/Controllers/AssetsController.php @@ -116,9 +116,9 @@ class AssetsController extends Controller ->with('statuslabel_list', Helper::statusLabelList()) ->with('location_list', Helper::locationsList()) ->with('item', new Asset) - ->with('manufacturer', Helper::manufacturerList()) - ->with('category', Helper::categoryList('asset')) - ->with('statuslabel_types', Helper::statusTypeList()) + ->with('manufacturer', Helper::manufacturerList()) //handled in modal now? + ->with('category', Helper::categoryList('asset')) //handled in modal now? + ->with('statuslabel_types', Helper::statusTypeList()) //handled in modal now? ->with('users_list', Helper::usersList()) ->with('assets_list', Helper::assetsList()) ->with('locations_list', Helper::locationsList()); diff --git a/app/Http/Controllers/ModalController.php b/app/Http/Controllers/ModalController.php new file mode 100644 index 0000000000..7ae8c61427 --- /dev/null +++ b/app/Http/Controllers/ModalController.php @@ -0,0 +1,32 @@ +with('manufacturer', Helper::manufacturerList()) + ->with('category', Helper::categoryList('asset')); + } + + function statuslabel() { + return view('modals.statuslabel')->with('statuslabel_types', Helper::statusTypeList()); + } + + function supplier() { + return view('modals.supplier'); + } + + function user() { + return view('modals.user'); + } +} diff --git a/resources/views/hardware/edit.blade.php b/resources/views/hardware/edit.blade.php index b994e32f10..be98068a7a 100755 --- a/resources/views/hardware/edit.blade.php +++ b/resources/views/hardware/edit.blade.php @@ -39,7 +39,7 @@ {!! $errors->first('model_id', ' :message') !!}
@@ -74,7 +74,7 @@ @@ -98,7 +98,7 @@ {!! $errors->first('assigned_location', ' :message') !!} @endif @@ -127,7 +127,7 @@ {!! $errors->first('rtd_location_id', ' :message') !!} @@ -160,7 +160,9 @@ @stop @section('moar_scripts') -@include('partials/modals') +{{-- Some room for the modals --}} +