@extends('layouts.app')
@section('title', __('vrc::lang.new_inspection'))
@section('content')
<section class="content-header"><h1>@lang('vrc::lang.new_inspection') — {{ $ro->number ?: ('RO #'.$ro->id) }}</h1></section>
<section class="content">
    @component('components.widget', ['class' => 'box-primary'])
        {!! Form::open(['route' => ['vrc.inspections.store', $ro->id], 'method' => 'POST']) !!}
        <div class="row">
            <div class="col-md-4"><div class="form-group">
                {!! Form::label('type', __('vrc::lang.inspection_type') . ':*') !!}
                {!! Form::select('type', ['intake'=>__('vrc::lang.dvi_intake'),'in_process'=>__('vrc::lang.dvi_in_process'),'final'=>__('vrc::lang.dvi_final')], $type, ['class' => 'form-control']) !!}
            </div></div>
            <div class="col-md-4"><div class="form-group">
                {!! Form::label('template_id', __('vrc::lang.template') . ':') !!}
                {!! Form::select('template_id', [''=>'—'] + $templates, null, ['class' => 'form-control']) !!}
            </div></div>
        </div>
        <div class="form-group">{!! Form::label('summary', __('vrc::lang.summary') . ':') !!}{!! Form::textarea('summary', null, ['class' => 'form-control', 'rows' => 2]) !!}</div>
        <button type="submit" class="btn btn-primary">@lang('vrc::lang.start_inspection')</button>
        <a href="{{ route('vrc.repair-orders.show', $ro->id) }}" class="btn btn-default">@lang('messages.cancel')</a>
        {!! Form::close() !!}
    @endcomponent
</section>
@endsection
