@extends('header') @section('content') {!! Former::open($url) ->addClass('col-lg-10 col-lg-offset-1 warn-on-exit main-form') ->autocomplete('off') ->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) : '') !!} {!! Former::populateField('budgeted_hours', floatval($project->budgeted_hours) ? $project->budgeted_hours : '') !!} @endif {!! Former::text('public_id') !!} {!! Former::text('action') !!}
@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('due_date') ->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT, DEFAULT_DATE_PICKER_FORMAT)) ->addGroupClass('due_date') ->append('') !!} {!! Former::text('budgeted_hours') !!} {!! Former::text('task_rate') ->placeholder($project && $project->client->task_rate ? $project->client->present()->taskRate : $account->present()->taskRate) ->help('task_rate_help') !!} @include('partials/custom_fields', ['entityType' => ENTITY_PROJECT]) {!! Former::textarea('private_notes')->rows(4) !!}
@if(Auth::user()->canCreateOrEdit(ENTITY_PROJECT))
{!! 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')) !!}
@endif {!! Former::close() !!} @stop