@extends('header') @section('head') @parent @stop @section('content') @if ($errors->first('time_log'))
  • {{ trans('texts.task_errors') }}
  • @endif {!! Former::open($url) ->addClass('col-md-10 col-md-offset-1 warn-on-exit task-form') ->onsubmit('return onFormSubmit(event)') ->method($method) !!} @if ($task) {!! Former::populate($task) !!} {!! Former::populateField('id', $task->public_id) !!} @endif
    @if ($task) {!! Former::text('id') !!} {!! Former::text('invoice_id') !!} @endif {!! Former::text('action') !!} {!! Former::text('time_log') !!}
    {!! Former::select('client')->addOption('', '')->addGroupClass('client-select') !!} {!! Former::textarea('description')->rows(3) !!} @if ($task) @if ($task->is_running)
    @endif @else {!! Former::radios('task_type')->radios([ trans('texts.timer') => array('name' => 'task_type', 'value' => 'timer'), trans('texts.manual') => array('name' => 'task_type', 'value' => 'manual'), ])->inline()->check('timer')->label(' ') !!} @endif
    @if (Auth::user()->canCreateOrEdit(ENTITY_TASK, $task)) @if (Auth::user()->hasFeature(FEATURE_TASKS)) @if ($task && $task->is_running) {!! Button::success(trans('texts.save'))->large()->appendIcon(Icon::create('floppy-disk'))->withAttributes(['id' => 'save-button']) !!} {!! Button::primary(trans('texts.stop'))->large()->appendIcon(Icon::create('stop'))->withAttributes(['id' => 'stop-button']) !!} @elseif ($task && $task->is_deleted) {!! Button::normal(trans('texts.cancel'))->large()->asLinkTo(URL::to('/tasks'))->appendIcon(Icon::create('remove-circle')) !!} {!! Button::primary(trans('texts.restore'))->large()->withAttributes(['onclick' => 'submitAction("restore")'])->appendIcon(Icon::create('cloud-download')) !!} @elseif ($task && $task->trashed()) {!! Button::normal(trans('texts.cancel'))->large()->asLinkTo(URL::to('/tasks'))->appendIcon(Icon::create('remove-circle')) !!} {!! Button::success(trans('texts.save'))->large()->appendIcon(Icon::create('floppy-disk'))->withAttributes(['id' => 'save-button']) !!} {!! Button::primary(trans('texts.restore'))->large()->withAttributes(['onclick' => 'submitAction("restore")'])->appendIcon(Icon::create('cloud-download')) !!} @else {!! Button::normal(trans('texts.cancel'))->large()->asLinkTo(URL::to('/tasks'))->appendIcon(Icon::create('remove-circle')) !!} @if ($task) {!! Button::success(trans('texts.save'))->large()->appendIcon(Icon::create('floppy-disk'))->withAttributes(['id' => 'save-button']) !!} {!! Button::primary(trans('texts.resume'))->large()->appendIcon(Icon::create('play'))->withAttributes(['id' => 'resume-button']) !!} {!! DropdownButton::normal(trans('texts.more_actions')) ->withContents($actions) ->large() ->dropup() !!} @else {!! Button::success(trans('texts.save'))->large()->appendIcon(Icon::create('floppy-disk'))->withAttributes(['id' => 'save-button']) !!} {!! Button::success(trans('texts.start'))->large()->appendIcon(Icon::create('play'))->withAttributes(['id' => 'start-button']) !!} @endif @endif @else {!! Button::normal(trans('texts.cancel'))->large()->asLinkTo(URL::to('/tasks'))->appendIcon(Icon::create('remove-circle')) !!} @endif @endif
    {!! Former::close() !!} @stop