@extends('layout.default') @if($mode == 'edit') @section('title', $__t('Edit task')) @else @section('title', $__t('Create task')) @endif @section('content')

@yield('title')


@if($mode == 'edit') @endif
{{ $__t('A name is required') }}
@php $initialDueDate = null; if ($mode == 'edit' && !empty($task->due_date)) { $initialDueDate = date('Y-m-d', strtotime($task->due_date)); } @endphp @include('components.datetimepicker', array( 'id' => 'due_date', 'label' => 'Due', 'format' => 'YYYY-MM-DD', 'initWithNow' => false, 'initialValue' => $initialDueDate, 'limitEndToNow' => false, 'limitStartToNow' => false, 'invalidFeedback' => $__t('A due date is required'), 'nextInputSelector' => 'category_id', 'additionalGroupCssClasses' => 'date-only-datetimepicker', 'isRequired' => false ))
@php $initUserId = GROCY_USER_ID; if ($mode == 'edit') { $initUserId = $task->assigned_to_user_id; } @endphp @include('components.userpicker', array( 'label' => 'Assigned to', 'users' => $users, 'prefillByUserId' => $initUserId )) @include('components.userfieldsform', array( 'userfields' => $userfields, 'entity' => 'tasks' )) @if($mode == 'edit') @else @endif
@stop