mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 22:37:28 -08:00
translations/messages on report template controller
This commit is contained in:
parent
27103124bf
commit
a5099b5163
|
@ -30,7 +30,7 @@ class ReportTemplatesController extends Controller
|
|||
|
||||
if (!$reportTemplate) {
|
||||
return redirect()->route('reports/custom')
|
||||
->with('error', 'Template does not exist or you do not have permission to view it.'); //needs translation
|
||||
->with('error', trans('admin/reports/message.no_report_permission'));
|
||||
}
|
||||
|
||||
$customfields = CustomField::get();
|
||||
|
@ -59,7 +59,7 @@ class ReportTemplatesController extends Controller
|
|||
|
||||
if (!$reportTemplate) {
|
||||
return redirect()->route('reports/custom')
|
||||
->with('error', 'Template does not exist or you do not have permission to view it.');
|
||||
->with('error', trans('admin/reports/message.no_report_permission'));
|
||||
}
|
||||
|
||||
$reportTemplate->options = $request->except(['_token', 'name']);
|
||||
|
@ -76,12 +76,12 @@ class ReportTemplatesController extends Controller
|
|||
|
||||
if (!$reportTemplate) {
|
||||
return redirect()->route('reports/custom')
|
||||
->with('error', 'Template does not exist or you do not have permission to delete it.');
|
||||
->with('error', trans('admin/reports/message.delete.no_delete_permission'));
|
||||
}
|
||||
|
||||
$reportTemplate->delete();
|
||||
|
||||
return redirect()->route('reports/custom')
|
||||
->with('success', 'Template deleted.');
|
||||
->with('success', trans('admin/reports/message.delete.delete_confirm'));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
return array(
|
||||
'error' => 'You must select at least ONE option.',
|
||||
'no_report_permission' => 'Template does not exist or you do not have permission to view it.',
|
||||
|
||||
'create' => [
|
||||
'success' => 'Report saved successfully',
|
||||
|
@ -9,7 +10,10 @@ return array(
|
|||
'duplicate' => 'Report title already exists. Please choose a different one.',
|
||||
],
|
||||
|
||||
'delete' => [
|
||||
'delete' => 'Are you sure you want to delete this report?',
|
||||
'no_report_permission' => 'Template does not exist or you do not have permission to view it.',
|
||||
'delete_confirm' => 'Template deleted',
|
||||
'no_delete_permission' => 'Template does not exist or you do not have permission to delete it.',
|
||||
],
|
||||
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue