Skip to content

Commit cf93544

Browse files
committed
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.
1 parent d03c157 commit cf93544

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"email": "[email protected]"
1212
}
1313
],
14-
"version": "0.2.3",
14+
"version": "0.2.4",
1515
"require": {
1616
"illuminate/html": "5.0.*@dev"
1717
},

src/Builders/ViewsBuilder.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,16 @@ private function buildTable()
127127
foreach ($this->fields as $field) {
128128
// Check if there is no duplication for radio and checkbox.
129129
// Password fields are excluded from the table too.
130-
if (!in_array($field->title, $used) && $field->type != 'password' && $field->show == 1) {
130+
if (!in_array($field->title, $used)
131+
&& $field->type != 'password'
132+
&& $field->type != 'textarea'
133+
&& $field->show == 1
134+
) {
131135
$headings .= "<th>$field->label</th>\r\n";
132136
// Format our table column by field type
133137
if ($field->type == 'relationship') {
134138
$columns .= '<td>{{ $row->' . $field->relationship_name . '->' . $field->relationship_field . " }}</td>\r\n";
135139
$used[$field->relationship_field] = $field->relationship_field;
136-
} elseif ($field->type == 'textarea') {
137-
$columns .= '<td>{!! $row->' . $field->title . " !!}</td>\r\n";
138-
$used[$field->title] = $field->title;
139140
} else {
140141
$columns .= '<td>{{ $row->' . $field->title . " }}</td>\r\n";
141142
$used[$field->title] = $field->title;

src/Controllers/QuickadminCrudController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,6 @@ public function insert(Request $request)
131131
// Destroy our cache file
132132
$cache->destroy('fieldsinfo');
133133

134-
return redirect('qa');
134+
return redirect(config('quickadmin.route'));
135135
}
136136
}

src/Views/admin/partials/topbar.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="page-header-inner">
33
<div class="page-header-inner">
44
<div class="navbar-header">
5-
<a href="{{ url('qa') }}" class="navbar-brand">
5+
<a href="{{ url(config('quickadmin.route')) }}" class="navbar-brand">
66
QuickAdmin
77
</a>
88
</div>

src/Views/templates/crud_field_line.blade.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,11 @@
3636

3737
<!-- Use ckeditor on textarea field -->
3838
<select name="f_texteditor[]" class="form-control texteditor" style="display: none;">
39-
<option>Use CKEDITOR</option>
40-
<option value="1"
41-
@if($key == old('f_texteditor.'.$index)) selected @endif>Yes
42-
</option>
4339
<option value="0"
44-
@if($key == old('f_texteditor.'.$index)) selected @endif>No
40+
@if($key == old('f_texteditor.'.$index)) selected @endif>Don't use CKEDITOR
41+
</option>
42+
<option value="1"
43+
@if($key == old('f_texteditor.'.$index)) selected @endif>Use CKEDITOR
4544
</option>
4645
</select>
4746
<!-- /Use ckeditor on textarea field -->

0 commit comments

Comments
 (0)