@if (Request::has('action') == false) {!! Form::open(['route' => ['tasks.store', $job->id]])!!}

{{ trans('task.create') }}

{!! FormField::text('name', ['label' => trans('task.name')]) !!}
{!! Form::label('progress', trans('task.progress'), ['class' => 'control-label']) !!} {!! Form::input('range', 'progress', 0, [ 'min' => '0', 'max' => '100', 'step' => '10', ]) !!}
0%
{!! FormField::textarea('description', ['label' => trans('task.description')]) !!} {!! Form::submit(trans('task.create'), ['class' => 'btn btn-primary']) !!} {!! Form::close() !!}
@endif @if (Request::get('action') == 'task_edit' && $editableTask) {!! Form::model($editableTask, ['route' => ['tasks.update', $editableTask->id],'method' => 'patch'])!!}

{{ trans('task.edit') }}

{!! FormField::text('name') !!}
{!! Form::label('progress', trans('task.progress'), ['class' => 'control-label']) !!} {!! Form::input('range', 'progress', null, [ 'min' => '0', 'max' => '100', 'step' => '10', ]) !!}
{{ $editableTask->progress }}%
{!! FormField::textarea('description') !!}
{!! FormField::select('job_id', $job->project->jobs->pluck('name','id'), ['label' => trans('task.move_to_other_job')]) !!}
{!! Form::submit(trans('task.update'), ['class' => 'btn btn-warning']) !!} {!! link_to_route('jobs.show', trans('app.cancel'), [$job->id], ['class' => 'btn btn-default']) !!} {!! Form::close() !!}
@endif @if (Request::get('action') == 'task_delete' && $editableTask)

{{ trans('task.delete') }}

{{ $editableTask->name }}
{!! nl2br($editableTask->description) !!}
@endif