Skip to content

Commit

Permalink
Fixed a bug when textarea field value would display on list page.
Browse files Browse the repository at this point in the history
Fixed text when creating new textarea field.
Fixed links to the dashboard page.
  • Loading branch information
ModestasV committed Nov 25, 2015
1 parent d03c157 commit cf93544
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"email": "[email protected]"
}
],
"version": "0.2.3",
"version": "0.2.4",
"require": {
"illuminate/html": "5.0.*@dev"
},
Expand Down
9 changes: 5 additions & 4 deletions src/Builders/ViewsBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 .= "<th>$field->label</th>\r\n";
// Format our table column by field type
if ($field->type == 'relationship') {
$columns .= '<td>{{ $row->' . $field->relationship_name . '->' . $field->relationship_field . " }}</td>\r\n";
$used[$field->relationship_field] = $field->relationship_field;
} elseif ($field->type == 'textarea') {
$columns .= '<td>{!! $row->' . $field->title . " !!}</td>\r\n";
$used[$field->title] = $field->title;
} else {
$columns .= '<td>{{ $row->' . $field->title . " }}</td>\r\n";
$used[$field->title] = $field->title;
Expand Down
2 changes: 1 addition & 1 deletion src/Controllers/QuickadminCrudController.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,6 @@ public function insert(Request $request)
// Destroy our cache file
$cache->destroy('fieldsinfo');

return redirect('qa');
return redirect(config('quickadmin.route'));
}
}
2 changes: 1 addition & 1 deletion src/Views/admin/partials/topbar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="page-header-inner">
<div class="page-header-inner">
<div class="navbar-header">
<a href="{{ url('qa') }}" class="navbar-brand">
<a href="{{ url(config('quickadmin.route')) }}" class="navbar-brand">
QuickAdmin
</a>
</div>
Expand Down
9 changes: 4 additions & 5 deletions src/Views/templates/crud_field_line.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@

<!-- Use ckeditor on textarea field -->
<select name="f_texteditor[]" class="form-control texteditor" style="display: none;">
<option>Use CKEDITOR</option>
<option value="1"
@if($key == old('f_texteditor.'.$index)) selected @endif>Yes
</option>
<option value="0"
@if($key == old('f_texteditor.'.$index)) selected @endif>No
@if($key == old('f_texteditor.'.$index)) selected @endif>Don't use CKEDITOR
</option>
<option value="1"
@if($key == old('f_texteditor.'.$index)) selected @endif>Use CKEDITOR
</option>
</select>
<!-- /Use ckeditor on textarea field -->
Expand Down

0 comments on commit cf93544

Please sign in to comment.