{!! Form::open(['url' => action('\Modules\Essentials\Http\Controllers\ToDoController@update', $todo->id), 'id' => 'task_form', 'method' => 'put']) !!}

@lang( 'essentials::lang.edit_to_do' )

{!! Form::label('task', __('essentials::lang.task') . ":*")!!} {!! Form::text('task', $todo->task, ['class' => 'form-control', 'required']) !!}
@can('essentials.assign_todos')
{!! Form::label('users', __('essentials::lang.assigned_to') . ':*') !!}
{!! Form::select('users[]', $users, $todo->users->pluck('id'), ['class' => 'form-control select2', 'multiple', 'required', 'style' => 'width: 100%;']); !!}
@endcan
{!! Form::label('priority', __('essentials::lang.priority') . ':') !!} {!! Form::select('priority', $priorities, $todo->priority, ['class' => 'form-control select2', 'placeholder' => __('messages.please_select'), 'style' => 'width: 100%;']); !!}
{!! Form::label('status', __('sale.status') . ':') !!} {!! Form::select('status', $task_statuses, $todo->status, ['class' => 'form-control select2', 'placeholder' => __('messages.please_select'), 'style' => 'width: 100%;']); !!}
{!! Form::label('date', __('business.start_date') . ':*') !!}
{!! Form::text('date', @format_datetime($todo->date), ['class' => 'form-control datepicker text-center', 'required', 'readonly']); !!}
{!! Form::label('end_date', __('essentials::lang.end_date') . ':') !!}
{!! Form::text('end_date', !empty($todo->end_date) ? @format_datetime($todo->end_date) : '', ['class' => 'form-control datepicker text-center', 'readonly']); !!}
{!! Form::label('estimated_hours', __('essentials::lang.estimated_hours') . ':') !!}
{!! Form::text('estimated_hours', $todo->estimated_hours, ['class' => 'form-control']); !!}
{!! Form::label('to_do_description', __('lang_v1.description') . ':') !!} {!! Form::textarea('description', $todo->description, ['id' => 'to_do_description']); !!}
{{-- params for media upload --}}
{!! Form::close() !!}