diff --git a/app/Http/Requests/TaskRequest.php b/app/Http/Requests/TaskRequest.php index 50afe37c7c3d..1fb10a6d7051 100644 --- a/app/Http/Requests/TaskRequest.php +++ b/app/Http/Requests/TaskRequest.php @@ -13,6 +13,7 @@ class TaskRequest extends EntityRequest { $input = $this->all(); + /* // check if we're creating a new client if ($this->client_id == '-1') { $client = [ @@ -23,7 +24,8 @@ class TaskRequest extends EntityRequest $input['client_id'] = $this->client_id = $client->public_id; } } - + */ + // check if we're creating a new project if ($this->project_id == '-1') { $project = [ diff --git a/resources/views/tasks/time_tracker.blade.php b/resources/views/tasks/time_tracker.blade.php index b12a02cade44..f7301680e0a1 100644 --- a/resources/views/tasks/time_tracker.blade.php +++ b/resources/views/tasks/time_tracker.blade.php @@ -246,7 +246,7 @@ $clientSelect.append(new Option('', '')); @if (Auth::user()->can('create', ENTITY_CLIENT)) - $clientSelect.append(new Option("{{ trans('texts.create_client')}}: $name", '-1')); + //$clientSelect.append(new Option("{{ trans('texts.create_client')}}: $name", '-1')); @endif for (var i=0; i ENTITY_CLIENT]) @include('partials/entity_combobox', ['entityType' => ENTITY_PROJECT]) refreshClientList(); diff --git a/resources/views/tasks/time_tracker_knockout.blade.php b/resources/views/tasks/time_tracker_knockout.blade.php index 1c498a097422..c38e153a9a62 100644 --- a/resources/views/tasks/time_tracker_knockout.blade.php +++ b/resources/views/tasks/time_tracker_knockout.blade.php @@ -394,9 +394,11 @@ if (project.public_id() != self.project_id()) { return "Project id's don't match " + project.public_id() + " " + self.project_id(); } - var client = projectMap[project.public_id()].client; - if (client.public_id != self.client_id()) { - return "Client and project id's don't match " + client.public_id + " " + self.client_id(); + if (project.public_id() != -1) { + var client = projectMap[project.public_id()].client; + if (client.public_id != self.client_id()) { + return "Client and project id's don't match " + client.public_id + " " + self.client_id(); + } } }