diff --git a/app/Http/Controllers/ReportTemplatesController.php b/app/Http/Controllers/ReportTemplatesController.php index 684b9527cd..098994f92a 100644 --- a/app/Http/Controllers/ReportTemplatesController.php +++ b/app/Http/Controllers/ReportTemplatesController.php @@ -39,7 +39,7 @@ class ReportTemplatesController extends Controller return view('reports/custom', [ 'customfields' => $customfields, 'report_templates' => $report_templates, - 'reportTemplate' => $reportTemplate, + 'template' => $reportTemplate, ]); } @@ -47,7 +47,7 @@ class ReportTemplatesController extends Controller { return view('reports/custom', [ 'customfields' => CustomField::get(), - 'reportTemplate' => ReportTemplate::findOrFail($reportId), + 'template' => ReportTemplate::findOrFail($reportId), ]); } diff --git a/app/Http/Controllers/ReportsController.php b/app/Http/Controllers/ReportsController.php index 43e2128d17..7765a28408 100644 --- a/app/Http/Controllers/ReportsController.php +++ b/app/Http/Controllers/ReportsController.php @@ -404,7 +404,7 @@ class ReportsController extends Controller return view('reports/custom', [ 'customfields' => $customfields, 'report_templates' => $report_templates, - 'reportTemplate' => $template, + 'template' => $template, ]); } diff --git a/resources/views/reports/custom.blade.php b/resources/views/reports/custom.blade.php index 7fd0e9f845..92cf5f322b 100644 --- a/resources/views/reports/custom.blade.php +++ b/resources/views/reports/custom.blade.php @@ -20,7 +20,7 @@ 'method' => 'post', 'class' => 'form-horizontal', 'id' => 'custom-report-form', - 'url' => request()->routeIs('report-templates.edit') ? route('report-templates.update', $reportTemplate) : '/reports/custom', + 'url' => request()->routeIs('report-templates.edit') ? route('report-templates.update', $template) : '/reports/custom', ]) }} {{csrf_field()}} @@ -29,9 +29,9 @@

@if (request()->routeIs('report-templates.edit')) - Updating: {{ $reportTemplate->name }} + Updating: {{ $template->name }} @elseif(request()->routeIs('report-templates.show')) - Saved Template: {{ $reportTemplate->name }} + Saved Template: {{ $template->name }} @else {{ trans('general.customize_report') }} @endif @@ -39,7 +39,7 @@ @if (request()->routeIs('report-templates.show'))
@@ -71,147 +71,147 @@ @@ -221,32 +221,32 @@

{{ trans('general.checked_out_to') }} {{ trans('general.fields') }}:

@@ -259,7 +259,7 @@ @foreach ($customfields as $customfield) @@ -280,68 +280,68 @@ 'multiple' => 'true', 'fieldname' => 'by_company_id[]', 'hide_new' => 'true', - 'selected' => $reportTemplate->selectValues('by_company_id', \App\Models\Company::class) + 'selected' => $template->selectValues('by_company_id', \App\Models\Company::class) ]) @include ('partials.forms.edit.location-select', [ 'translated_name' => trans('general.location'), 'multiple' => 'true', 'fieldname' => 'by_location_id[]', 'hide_new' => 'true', - 'selected' => $reportTemplate->selectValues('by_location_id', \App\Models\Location::class) + 'selected' => $template->selectValues('by_location_id', \App\Models\Location::class) ]) @include ('partials.forms.edit.location-select', [ 'translated_name' => trans('admin/hardware/form.default_location'), 'multiple' => 'true', 'fieldname' => 'by_rtd_location_id[]', 'hide_new' => 'true', - 'selected' => $reportTemplate->selectValues('by_rtd_location_id', \App\Models\Location::class) + 'selected' => $template->selectValues('by_rtd_location_id', \App\Models\Location::class) ]) @include ('partials.forms.edit.department-select', [ 'translated_name' => trans('general.department'), 'fieldname' => 'by_dept_id', 'hide_new' => 'true', - 'selected' => $reportTemplate->selectValue('by_dept_id', \App\Models\Department::class) + 'selected' => $template->selectValue('by_dept_id', \App\Models\Department::class) ]) @include ('partials.forms.edit.supplier-select', [ 'translated_name' => trans('general.supplier'), 'fieldname' => 'by_supplier_id[]', 'multiple' => 'true', 'hide_new' => 'true', - 'selected' => $reportTemplate->selectValues('by_supplier_id', \App\Models\Supplier::class) + 'selected' => $template->selectValues('by_supplier_id', \App\Models\Supplier::class) ]) @include ('partials.forms.edit.model-select', [ 'translated_name' => trans('general.asset_model'), 'fieldname' => 'by_model_id[]', 'multiple' => 'true', 'hide_new' => 'true', - 'selected' => $reportTemplate->selectValues('by_model_id', \App\Models\AssetModel::class) + 'selected' => $template->selectValues('by_model_id', \App\Models\AssetModel::class) ]) @include ('partials.forms.edit.manufacturer-select', [ 'translated_name' => trans('general.manufacturer'), 'fieldname' => 'by_manufacturer_id', 'hide_new' => 'true', - 'selected' => $reportTemplate->selectValue('by_manufacturer_id', \App\Models\Manufacturer::class) + 'selected' => $template->selectValue('by_manufacturer_id', \App\Models\Manufacturer::class) ]) @include ('partials.forms.edit.category-select', [ 'translated_name' => trans('general.category'), 'fieldname' => 'by_category_id', 'hide_new' => 'true', 'category_type' => 'asset', - 'selected' => $reportTemplate->selectValue('by_category_id', \App\Models\Category::class) + 'selected' => $template->selectValue('by_category_id', \App\Models\Category::class) ]) @include ('partials.forms.edit.status-select', [ 'translated_name' => trans('admin/hardware/form.status'), 'fieldname' => 'by_status_id[]', 'multiple' => 'true', 'hide_new' => 'true', - 'selected' => $reportTemplate->selectValues('by_status_id', \App\Models\Statuslabel::class) + 'selected' => $template->selectValues('by_status_id', \App\Models\Statuslabel::class) ])
- +
@@ -349,9 +349,9 @@
- + to - +
@@ -359,9 +359,9 @@
- + to - +
@@ -369,9 +369,9 @@
- + to - +
@@ -379,9 +379,9 @@
- + to - +
@@ -389,9 +389,9 @@
- + to - +
@@ -399,36 +399,36 @@
- + to - +
@@ -480,7 +480,7 @@
- + {!! $errors->first('name', '') !!}