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

@lang('global.tasks.title')

{!! Form::open(['method' => 'POST', 'route' => ['admin.tasks.store'], 'files' => true,'class'=>'formvalidation']) !!}
@lang('global.app_create')
{!! Form::label('name', trans('global.tasks.fields.name').'*', ['class' => 'control-label form-label']) !!}
{!! Form::text('name', old('name'), ['class' => 'form-control', 'placeholder' => 'Name', 'required' => '']) !!}

@if($errors->has('name'))

{{ $errors->first('name') }}

@endif
{!! Form::label('status_id', trans('global.tasks.fields.status').'*', ['class' => 'control-label']) !!} {!! Form::select('status_id', $statuses, old('status_id', 1), ['class' => 'form-control select2', 'required' => '']) !!}

@if($errors->has('status_id'))

{{ $errors->first('status_id') }}

@endif
{!! Form::label('user_id', trans('global.tasks.fields.user').'', ['class' => 'control-label']) !!} {!! Form::select('user_id', $users, old('user_id'), ['class' => 'form-control select2','placeholder' => 'Please select']) !!}

@if($errors->has('user_id'))

{{ $errors->first('user_id') }}

@endif
{!! Form::label('start_date', trans('global.tasks.fields.start-date').'', ['class' => 'control-label form-label']) !!}
{!! Form::text('start_date', old('start_date'), ['class' => 'form-control date', 'placeholder' => 'Start Date']) !!}

@if($errors->has('start_date'))

{{ $errors->first('start_date') }}

@endif
{!! Form::label('due_date', trans('global.tasks.fields.due-date').'', ['class' => 'control-label form-label']) !!}
{!! Form::text('due_date', old('due_date'), ['class' => 'form-control date', 'placeholder' => 'Due Date']) !!}

@if($errors->has('due_date'))

{{ $errors->first('due_date') }}

@endif
{!! Form::label('attachment', trans('global.tasks.fields.thumbnail').'', ['class' => 'control-label']) !!} {!! Form::hidden('attachment', old('attachment')) !!} {!! Form::file('attachment', ['class' => 'form-control']) !!} {!! Form::hidden('attachment_max_size', 8) !!}

{{trans('others.global_file_types_gallery')}}

@if($errors->has('attachment'))

{{ $errors->first('attachment') }}

@endif
{!! Form::label('description', trans('global.tasks.fields.description').'', ['class' => 'control-label']) !!} {!! Form::textarea('description', old('description'), ['class' => 'form-control ', 'placeholder' => 'Description','rows'=>'4']) !!}

@if($errors->has('description'))

{{ $errors->first('description') }}

@endif
{!! Form::submit(trans('global.app_save'), ['class' => 'btn btn-danger wave-effect']) !!} {!! Form::close() !!} @stop @section('javascript') @parent @stop