@extends('layouts/default') {{-- Page Title --}} @section('title') {{ trans('general.custom_report') }} @parent @stop @section('header_right') @stop {{-- Page content --}} @section('content')
{{ Form::open([ 'method' => 'post', 'class' => 'form-horizontal', 'id' => 'custom-report-form', 'url' => request()->routeIs('report-templates.edit') ? route('report-templates.update', $reportTemplate) : '/reports/custom', ]) }} {{csrf_field()}}

@if (request()->routeIs('report-templates.edit')) Updating: {{ $reportTemplate->name }} @elseif(request()->routeIs('report-templates.show')) Saved Template: {{ $reportTemplate->name }} @else {{ trans('general.customize_report') }} @endif

@if (request()->routeIs('report-templates.show') || request()->routeIs('report-templates.edit'))
{{ trans('general.update') }}
@endif

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

@if ($customfields->count() > 0)

{{ trans('admin/custom_fields/general.custom_fields') }}

@foreach ($customfields as $customfield) @endforeach @endif

{!! trans('general.report_fields_info') !!}


@include ('partials.forms.edit.company-select', [ 'translated_name' => trans('general.company'), 'multiple' => 'true', 'fieldname' => 'by_company_id[]', 'hide_new' => 'true', 'selected' => $reportTemplate->selectValues('by_company_id') ]) @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) ]) @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) ]) @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) ]) @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') ]) @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') ]) @include ('partials.forms.edit.manufacturer-select', [ 'translated_name' => trans('general.manufacturer'), 'fieldname' => 'by_manufacturer_id', 'hide_new' => 'true', 'selected' => $reportTemplate->selectValue('by_manufacturer_id') ]) @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') ]) @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') ])
to
to
to
to
to
to
{{ Form::close() }}
@if (! request()->routeIs('report-templates.edit'))
@push('js') @endpush
@endif @if (request()->routeIs('reports/custom'))
@csrf
{{--this means that the name of a loaded report is in the input box. could lead to confusion with update--}} {!! $errors->first('name', '') !!}
@endif
@stop @section('moar_scripts') @stop