Browse Source

Fix some invalid class attributes

tags/1.2.2
Nafies Luthfi 7 years ago
parent
commit
a1bbd9e2f9
  1. 4
      src/stubs/resources/views/simple/forms.stub
  2. 4
      tests/Generators/Simple/ViewsGeneratorTest.php

4
src/stubs/resources/views/simple/forms.stub

@ -36,7 +36,7 @@
<input type="submit" value="{{ __('master.update') }}" class="btn btn-success">
<a href="{{ route('masters.index', Request::only('q', 'page')) }}" class="btn btn-link">{{ __('app.cancel') }}</a>
@can('delete', $editableMaster)
<a href="{{ route('masters.index', ['action' => 'delete', 'id' => $editableMaster->id] + Request::only('page', 'q')) }}" id="del-master-{{ $editableMaster->id }}" class="btn btn-danger pull-right">{{ __('app.delete') }}</a>
<a href="{{ route('masters.index', ['action' => 'delete', 'id' => $editableMaster->id] + Request::only('page', 'q')) }}" id="del-master-{{ $editableMaster->id }}" class="btn btn-danger float-right">{{ __('app.delete') }}</a>
@endcan
</form>
@endcan
@ -55,7 +55,7 @@
<hr style="margin:0">
<div class="card-body text-danger">{{ __('master.delete_confirm') }}</div>
<div class="card-footer">
<form method="POST" action="{{ route('masters.destroy', $editableMaster) }}" accept-charset="UTF-8" onsubmit="return confirm(&quot;Are you sure to delete this?&quot;)" class="del-form pull-right" style="display: inline;">
<form method="POST" action="{{ route('masters.destroy', $editableMaster) }}" accept-charset="UTF-8" onsubmit="return confirm(&quot;Are you sure to delete this?&quot;)" class="del-form float-right" style="display: inline;">
{{ csrf_field() }} {{ method_field('delete') }}
<input name="master_id" type="hidden" value="{{ $editableMaster->id }}">
<input name="page" value="{{ request('page') }}" type="hidden">

4
tests/Generators/Simple/ViewsGeneratorTest.php

@ -124,7 +124,7 @@ class ViewsGeneratorTest extends TestCase
<input type=\"submit\" value=\"{{ __('{$this->lang_name}.update') }}\" class=\"btn btn-success\">
<a href=\"{{ route('{$this->table_name}.index', Request::only('q', 'page')) }}\" class=\"btn btn-link\">{{ __('app.cancel') }}</a>
@can('delete', \$editable{$this->model_name})
<a href=\"{{ route('{$this->table_name}.index', ['action' => 'delete', 'id' => \$editable{$this->model_name}->id] + Request::only('page', 'q')) }}\" id=\"del-{$this->lang_name}-{{ \$editable{$this->model_name}->id }}\" class=\"btn btn-danger pull-right\">{{ __('app.delete') }}</a>
<a href=\"{{ route('{$this->table_name}.index', ['action' => 'delete', 'id' => \$editable{$this->model_name}->id] + Request::only('page', 'q')) }}\" id=\"del-{$this->lang_name}-{{ \$editable{$this->model_name}->id }}\" class=\"btn btn-danger float-right\">{{ __('app.delete') }}</a>
@endcan
</form>
@endcan
@ -143,7 +143,7 @@ class ViewsGeneratorTest extends TestCase
<hr style=\"margin:0\">
<div class=\"card-body text-danger\">{{ __('{$this->lang_name}.delete_confirm') }}</div>
<div class=\"card-footer\">
<form method=\"POST\" action=\"{{ route('{$this->table_name}.destroy', \$editable{$this->model_name}) }}\" accept-charset=\"UTF-8\" onsubmit=\"return confirm(&quot;Are you sure to delete this?&quot;)\" class=\"del-form pull-right\" style=\"display: inline;\">
<form method=\"POST\" action=\"{{ route('{$this->table_name}.destroy', \$editable{$this->model_name}) }}\" accept-charset=\"UTF-8\" onsubmit=\"return confirm(&quot;Are you sure to delete this?&quot;)\" class=\"del-form float-right\" style=\"display: inline;\">
{{ csrf_field() }} {{ method_field('delete') }}
<input name=\"{$this->lang_name}_id\" type=\"hidden\" value=\"{{ \$editable{$this->model_name}->id }}\">
<input name=\"page\" value=\"{{ request('page') }}\" type=\"hidden\">

Loading…
Cancel
Save