@extends('layouts.master') @section('content')

@lang('models/extensions.plural')

@include('flash::message')
{!! Form::open(['route' => ['projects.store_extensions', $project->id ] ]) !!}
{!! Form::label('name', __('models/extensions.fields.name').':') !!} {!! Form::text('name', null, ['class' => ($errors->has('name')) ? 'form-control is-invalid' : 'form-control']) !!} @if ($errors->has('name')) {{ $errors->first('name') }} @endif
{!! Form::label('value', __('models/extensions.fields.value').':') !!} {!! Form::text('value', null, ['class' => ($errors->has('value')) ? 'form-control is-invalid' : 'form-control']) !!} @if ($errors->has('value')) {{ $errors->first('value') }} @endif
{!! Form::label('quotation_id', __('models/extensions.fields.quotation').':') !!} {!! Form::select('quotation_id', $quotationItems, null, ['class' => ($errors->has('quotation_id')) ? 'form-control is-invalid' : 'form-control' ,'id'=>'quotation_id']) !!} @if ($errors->has('quotation_id')) {{ $errors->first('quotation_id') }} @endif
{!! Form::submit(__('crud.save'), ['class' => 'btn btn-danger']) !!} @lang('crud.cancel')
{!! Form::close() !!}
@if($project && $project->extensions) @foreach($project->extensions as $item) @endforeach @endif
@lang('models/extensions.fields.name') @lang('models/extensions.fields.value') @lang('models/extensions.fields.quotation')
{{ $item->pivot->name }} {{ $item->pivot->value }} {{ $item->name }} {!! Form::open(['route' => ['projects.delete_extensions', $project->id], 'method' => 'delete']) !!} {!! Form::button('', [ 'type' => 'submit', 'class' => 'btn btn-danger', 'onclick' => "return confirm('Are you sure?')" ]) !!} {!! Form::close() !!}
@endsection @section('scripts') @parent @endsection