From cf93544a39ed6598fc9eebd621a021ed9b70e81c Mon Sep 17 00:00:00 2001 From: ModestasV Date: Wed, 25 Nov 2015 17:20:56 +0200 Subject: [PATCH] Fixed a bug when textarea field value would display on list page. Fixed text when creating new textarea field. Fixed links to the dashboard page. --- composer.json | 2 +- src/Builders/ViewsBuilder.php | 9 +++++---- src/Controllers/QuickadminCrudController.php | 2 +- src/Views/admin/partials/topbar.blade.php | 2 +- src/Views/templates/crud_field_line.blade.php | 9 ++++----- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/composer.json b/composer.json index 1d52e9b..4588c18 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ "email": "povilas@webcoderpro.com" } ], - "version": "0.2.3", + "version": "0.2.4", "require": { "illuminate/html": "5.0.*@dev" }, diff --git a/src/Builders/ViewsBuilder.php b/src/Builders/ViewsBuilder.php index acf6f3f..ebb2901 100644 --- a/src/Builders/ViewsBuilder.php +++ b/src/Builders/ViewsBuilder.php @@ -127,15 +127,16 @@ private function buildTable() foreach ($this->fields as $field) { // Check if there is no duplication for radio and checkbox. // Password fields are excluded from the table too. - if (!in_array($field->title, $used) && $field->type != 'password' && $field->show == 1) { + if (!in_array($field->title, $used) + && $field->type != 'password' + && $field->type != 'textarea' + && $field->show == 1 + ) { $headings .= "$field->label\r\n"; // Format our table column by field type if ($field->type == 'relationship') { $columns .= '{{ $row->' . $field->relationship_name . '->' . $field->relationship_field . " }}\r\n"; $used[$field->relationship_field] = $field->relationship_field; - } elseif ($field->type == 'textarea') { - $columns .= '{!! $row->' . $field->title . " !!}\r\n"; - $used[$field->title] = $field->title; } else { $columns .= '{{ $row->' . $field->title . " }}\r\n"; $used[$field->title] = $field->title; diff --git a/src/Controllers/QuickadminCrudController.php b/src/Controllers/QuickadminCrudController.php index 8441245..36621b2 100644 --- a/src/Controllers/QuickadminCrudController.php +++ b/src/Controllers/QuickadminCrudController.php @@ -131,6 +131,6 @@ public function insert(Request $request) // Destroy our cache file $cache->destroy('fieldsinfo'); - return redirect('qa'); + return redirect(config('quickadmin.route')); } } \ No newline at end of file diff --git a/src/Views/admin/partials/topbar.blade.php b/src/Views/admin/partials/topbar.blade.php index 712b6d3..8bd7f5b 100644 --- a/src/Views/admin/partials/topbar.blade.php +++ b/src/Views/admin/partials/topbar.blade.php @@ -2,7 +2,7 @@
diff --git a/src/Views/templates/crud_field_line.blade.php b/src/Views/templates/crud_field_line.blade.php index 4082ed8..7fd3db8 100644 --- a/src/Views/templates/crud_field_line.blade.php +++ b/src/Views/templates/crud_field_line.blade.php @@ -36,12 +36,11 @@