@extends('header') @section('content') {!! Former::open($url)->addClass('col-md-10 col-md-offset-1 warn-on-exit task-form')->method($method)->rules(array( )) !!} @if ($task) {!! Former::populate($task) !!} @endif
{!! Former::text('action') !!} {!! Former::text('start_time') !!} {!! Former::text('duration') !!}
{!! Former::select('client')->addOption('', '')->addGroupClass('client-select') !!} {!! Former::textarea('description')->rows(3) !!} @if ($task && $task->duration == -1)
@else @if (!$task) {!! 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(' ') !!}
@if ($task && $task->duration == -1) {!! 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']) !!} @else @if ($task) {!! Button::success(trans('texts.save'))->large()->appendIcon(Icon::create('floppy-disk'))->withAttributes(['id' => 'save-button']) !!} @else {!! Button::success(trans('texts.start'))->large()->appendIcon(Icon::create('play'))->withAttributes(['id' => 'start-button']) !!} {!! Button::success(trans('texts.save'))->large()->appendIcon(Icon::create('floppy-disk'))->withAttributes(['id' => 'save-button', 'style' => 'display:none']) !!} @endif {!! Button::normal(trans('texts.cancel'))->large()->asLinkTo(URL::to('/tasks'))->appendIcon(Icon::create('remove-circle')) !!} @endif
{!! Former::close() !!} @stop