Use existing translation string
This commit is contained in:
@@ -192,7 +192,7 @@ class AccessoriesController extends Controller
|
||||
|
||||
|
||||
if ($accessory->checkouts_count > 0) {
|
||||
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.assoc_checkouts', ['count' => $accessory->checkouts_count]));
|
||||
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/general.delete_disabled'));
|
||||
}
|
||||
|
||||
if ($accessory->image) {
|
||||
|
||||
@@ -253,7 +253,7 @@ class AccessoriesController extends Controller
|
||||
$this->authorize($accessory);
|
||||
|
||||
if ($accessory->checkouts_count > 0) {
|
||||
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/accessories/message.assoc_checkouts', ['count' => $accessory->checkouts_count])));
|
||||
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/accessories/general.delete_disabled')));
|
||||
}
|
||||
|
||||
$accessory->delete();
|
||||
|
||||
@@ -5,7 +5,6 @@ return array(
|
||||
'does_not_exist' => 'The accessory [:id] does not exist.',
|
||||
'not_found' => 'That accessory was not found.',
|
||||
'assoc_users' => 'This accessory currently has :count items checked out to users. Please check in the accessories and and try again. ',
|
||||
'assoc_checkouts' => 'This accessory currently has :count items checked out. Please check in the accessories and and try again.',
|
||||
|
||||
'create' => array(
|
||||
'error' => 'The accessory was not created, please try again.',
|
||||
|
||||
Reference in New Issue
Block a user