{!! Form::label('name', trans('global.project-tasks.fields.name').'*', ['class' => 'control-label']) !!} {!! Form::text('name', old('name'), ['class' => 'form-control', 'placeholder' => '', 'required' => '']) !!}

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

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

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

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

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

@endif
{!! Form::label('startdate', trans('global.project-tasks.fields.startdate').'*', ['class' => 'control-label']) !!} {!! Form::text('startdate', old('startdate', $startdate), ['class' => 'form-control date', 'placeholder' => '', 'required' => '']) !!}

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

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

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

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

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

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

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

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

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

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

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

@endif
{!! Form::label('billable', trans('global.project-tasks.fields.billable').'', ['class' => 'control-label']) !!} {!! Form::select('billable', $enum_billable, old('billable'), ['class' => 'form-control select2']) !!}

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

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

@endif
{!! Form::label('recurring_id', trans('global.project-tasks.fields.recurring').'', ['class' => 'control-label']) !!} {!! Form::select('recurring_id', $recurrings, old('recurring_id'), ['class' => 'form-control select2', 'id' => 'recurring_period_id']) !!}

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

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

@endif
{!! Form::label('recurring_value', trans('global.project-tasks.fields.recurring-value').'', ['class' => 'control-label']) !!} {!! Form::number('recurring_value', old('recurring_value'), ['class' => 'form-control', 'placeholder' => '','min'=>'0']) !!}

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

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

@endif
{!! Form::label('recurring_type', trans('global.project-tasks.fields.recurring-type').'', ['class' => 'control-label']) !!} {!! Form::select('recurring_type', $enum_recurring_type, old('recurring_type'), ['class' => 'form-control select2']) !!}

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

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

@endif
{!! Form::label('cycles', trans('global.project-tasks.fields.cycles').'', ['class' => 'control-label']) !!} {!! Form::number('cycles', old('cycles'), ['class' => 'form-control', 'placeholder' => '','min'=>'0']) !!}

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

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

@endif
{!! Form::label('billed', trans('global.project-tasks.fields.billed').'', ['class' => 'control-label']) !!} {!! Form::select('billed', $enum_billed, old('billed'), ['class' => 'form-control select2']) !!}

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

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

@endif
{!! Form::label('hourly_rate', trans('global.project-tasks.fields.hourly-rate').'', ['class' => 'control-label']) !!} {!! Form::number('hourly_rate', old('hourly_rate'), ['class' => 'form-control', 'placeholder' => '','min'=>'0']) !!}

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

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

@endif
{!! Form::label('visible_to_client', trans('global.project-tasks.fields.visible-to-client').'', ['class' => 'control-label']) !!} {!! Form::select('visible_to_client', $enum_visible_to_client, old('visible_to_client'), ['class' => 'form-control select2']) !!}

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

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

@endif
{!! Form::label('milestone', trans('global.project-tasks.fields.milestone').'', ['class' => 'control-label']) !!} {!! Form::select('milestone', $mile_stones, old('milestone'), ['class' => 'form-control select2']) !!}

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

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

@endif
{!! Form::label('assigned_to', trans('global.client-projects.fields.assigned-to').'', ['class' => 'control-label']) !!} {!! Form::select('assigned_to[]', $users, old('assigned_to'), ['class' => 'form-control select2', 'multiple' => 'multiple', 'id' => 'selectall-assigned_to' ]) !!}

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

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

@endif
{!! Form::label('attachments', trans('global.project-tasks.fields.attachments').'', ['class' => 'control-label']) !!} {!! Form::file('attachments[]', [ 'multiple', 'class' => 'form-control file-upload', 'data-url' => route('admin.media.upload'), 'data-bucket' => 'attachments', 'data-filekey' => 'attachments', 'data-accept' => FILE_TYPES_GENERAL, ]) !!}

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

 
@if ( ! empty($project_task) ) @foreach($project_task->getMedia('attachments') as $media)

{{ $media->name }} ({{ $media->size }} KB) Remove

@endforeach @endif
@if($errors->has('attachments'))

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

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

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

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

@endif