mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
translations for messages
This commit is contained in:
parent
382d849ee1
commit
0f72554a9f
|
@ -335,13 +335,13 @@ class BulkAssetsController extends Controller
|
|||
public function restore(Request $request) {
|
||||
$assetIds = $request->get('ids');
|
||||
if (empty($assetIds)) {
|
||||
return redirect()->route('hardware.index')->with('error', 'No Assets Selected');
|
||||
return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.restore.nothing_updated'));
|
||||
} else {
|
||||
foreach ($assetIds as $key => $assetId) {
|
||||
$asset = Asset::withTrashed()->find($assetId);
|
||||
$asset->restore();
|
||||
}
|
||||
return redirect()->route('hardware.index')->with('success', 'Assets Restored');
|
||||
return redirect()->route('hardware.index')->with('success', trans('admin/hardware/message.restore.success'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,8 @@ return [
|
|||
'restore' => [
|
||||
'error' => 'Asset was not restored, please try again',
|
||||
'success' => 'Asset restored successfully.',
|
||||
'bulk_success' => 'Asset restored successfully.',
|
||||
'nothing_updated' => 'No assets were selected, so nothing was restored.',
|
||||
],
|
||||
|
||||
'audit' => [
|
||||
|
|
Loading…
Reference in a new issue