@extends('header') @section('content') {!! Former::open($url) ->addClass('col-md-10 col-md-offset-1 warn-on-exit') ->method($method) ->rules([ 'name' => 'required', 'client_id' => 'required', ]) !!} @if ($project) {!! Former::populate($project) !!} {!! Former::populateField('task_rate', floatval($project->task_rate) ? Utils::roundSignificant($project->task_rate) : '') !!} @endif {!! Former::text('public_id') !!}

{!! trans('texts.project') !!}

@if ($project) {!! Former::plaintext('client_name') ->value($project->client ? $project->client->present()->link : '') !!} @else {!! Former::select('client_id') ->addOption('', '') ->label(trans('texts.client')) ->addGroupClass('client-select') !!} @endif {!! Former::text('name') !!} {!! Former::text('task_rate') ->help('task_rate_help') !!}
{!! Button::normal(trans('texts.cancel'))->large()->asLinkTo(HTMLUtils::previousUrl('/projects'))->appendIcon(Icon::create('remove-circle')) !!} {!! Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) !!} @if ($project && Auth::user()->can('create', ENTITY_TASK)) {!! Button::primary(trans('texts.new_task'))->large() ->asLinkTo(url('/tasks/create/' . ($project->client ? $project->client->public_id : '0'). '/' . $project->public_id)) ->appendIcon(Icon::create('plus-sign')) !!} @endif
{!! Former::close() !!} @stop