Browse Source

Update delete buttons to use lang

tags/1.2.9
Nafies Luthfi 7 years ago
parent
commit
f618b28601
  1. 4
      src/stubs/resources/views/full/edit-bs3.stub
  2. 4
      src/stubs/resources/views/full/edit.stub
  3. 4
      src/stubs/resources/views/simple/forms-bs3.stub
  4. 4
      src/stubs/resources/views/simple/forms.stub
  5. 4
      tests/CommandOptions/FullCrudBs3OptionsTest.php
  6. 4
      tests/CommandOptions/SimpleCrudBs3OptionsTest.php
  7. 4
      tests/Generators/Simple/ViewsGeneratorTest.php
  8. 4
      tests/Generators/ViewsGeneratorTest.php

4
src/stubs/resources/views/full/edit-bs3.stub

@ -19,10 +19,10 @@
<hr style="margin:0">
<div class="panel-body text-danger">{{ __('master.delete_confirm') }}</div>
<div class="panel-footer">
<form method="POST" action="{{ route('masters.destroy', $singleMstr) }}" 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', $singleMstr) }}" accept-charset="UTF-8" onsubmit="return confirm(&quot;{{ __('app.delete_confirm') }}&quot;)" class="del-form pull-right" style="display: inline;">
{{ csrf_field() }} {{ method_field('delete') }}
<input name="master_id" type="hidden" value="{{ $singleMstr->id }}">
<button title="Delete this item" type="submit" class="btn btn-danger">{{ __('app.delete_confirm_button') }}</button>
<button type="submit" class="btn btn-danger">{{ __('app.delete_confirm_button') }}</button>
</form>
<a href="{{ route('masters.edit', $singleMstr) }}" class="btn btn-default">{{ __('app.cancel') }}</a>
</div>

4
src/stubs/resources/views/full/edit.stub

@ -19,10 +19,10 @@
<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', $singleMstr) }}" accept-charset="UTF-8" onsubmit="return confirm(&quot;Are you sure to delete this?&quot;)" class="del-form float-right" style="display: inline;">
<form method="POST" action="{{ route('masters.destroy', $singleMstr) }}" accept-charset="UTF-8" onsubmit="return confirm(&quot;{{ __('app.delete_confirm') }}&quot;)" class="del-form float-right" style="display: inline;">
{{ csrf_field() }} {{ method_field('delete') }}
<input name="master_id" type="hidden" value="{{ $singleMstr->id }}">
<button title="Delete this item" type="submit" class="btn btn-danger">{{ __('app.delete_confirm_button') }}</button>
<button type="submit" class="btn btn-danger">{{ __('app.delete_confirm_button') }}</button>
</form>
<a href="{{ route('masters.edit', $singleMstr) }}" class="btn btn-link">{{ __('app.cancel') }}</a>
</div>

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

@ -55,12 +55,12 @@
<hr style="margin:0">
<div class="panel-body text-danger">{{ __('master.delete_confirm') }}</div>
<div class="panel-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;{{ __('app.delete_confirm') }}&quot;)" class="del-form pull-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">
<input name="q" value="{{ request('q') }}" type="hidden">
<button title="Delete this item" type="submit" class="btn btn-danger">{{ __('app.delete_confirm_button') }}</button>
<button type="submit" class="btn btn-danger">{{ __('app.delete_confirm_button') }}</button>
</form>
<a href="{{ route('masters.index', Request::only('q', 'page')) }}" class="btn btn-default">{{ __('app.cancel') }}</a>
</div>

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

@ -55,12 +55,12 @@
<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 float-right" style="display: inline;">
<form method="POST" action="{{ route('masters.destroy', $editableMaster) }}" accept-charset="UTF-8" onsubmit="return confirm(&quot;{{ __('app.delete_confirm') }}&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">
<input name="q" value="{{ request('q') }}" type="hidden">
<button title="Delete this item" type="submit" class="btn btn-danger">{{ __('app.delete_confirm_button') }}</button>
<button type="submit" class="btn btn-danger">{{ __('app.delete_confirm_button') }}</button>
</form>
<a href="{{ route('masters.index', Request::only('q', 'page')) }}" class="btn btn-link">{{ __('app.cancel') }}</a>
</div>

4
tests/CommandOptions/FullCrudBs3OptionsTest.php

@ -210,10 +210,10 @@ class FullCrudBs3OptionsTest extends TestCase
<hr style=\"margin:0\">
<div class=\"panel-body text-danger\">{{ __('{$this->lang_name}.delete_confirm') }}</div>
<div class=\"panel-footer\">
<form method=\"POST\" action=\"{{ route('{$this->table_name}.destroy', \${$this->single_model_var_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', \${$this->single_model_var_name}) }}\" accept-charset=\"UTF-8\" onsubmit=\"return confirm(&quot;{{ __('app.delete_confirm') }}&quot;)\" class=\"del-form pull-right\" style=\"display: inline;\">
{{ csrf_field() }} {{ method_field('delete') }}
<input name=\"{$this->lang_name}_id\" type=\"hidden\" value=\"{{ \${$this->single_model_var_name}->id }}\">
<button title=\"Delete this item\" type=\"submit\" class=\"btn btn-danger\">{{ __('app.delete_confirm_button') }}</button>
<button type=\"submit\" class=\"btn btn-danger\">{{ __('app.delete_confirm_button') }}</button>
</form>
<a href=\"{{ route('{$this->table_name}.edit', \${$this->single_model_var_name}) }}\" class=\"btn btn-default\">{{ __('app.cancel') }}</a>
</div>

4
tests/CommandOptions/SimpleCrudBs3OptionsTest.php

@ -169,12 +169,12 @@ class SimpleCrudBs3OptionsTest extends TestCase
<hr style=\"margin:0\">
<div class=\"panel-body text-danger\">{{ __('{$this->lang_name}.delete_confirm') }}</div>
<div class=\"panel-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;{{ __('app.delete_confirm') }}&quot;)\" class=\"del-form pull-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\">
<input name=\"q\" value=\"{{ request('q') }}\" type=\"hidden\">
<button title=\"Delete this item\" type=\"submit\" class=\"btn btn-danger\">{{ __('app.delete_confirm_button') }}</button>
<button type=\"submit\" class=\"btn btn-danger\">{{ __('app.delete_confirm_button') }}</button>
</form>
<a href=\"{{ route('{$this->table_name}.index', Request::only('q', 'page')) }}\" class=\"btn btn-default\">{{ __('app.cancel') }}</a>
</div>

4
tests/Generators/Simple/ViewsGeneratorTest.php

@ -143,12 +143,12 @@ 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 float-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;{{ __('app.delete_confirm') }}&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\">
<input name=\"q\" value=\"{{ request('q') }}\" type=\"hidden\">
<button title=\"Delete this item\" type=\"submit\" class=\"btn btn-danger\">{{ __('app.delete_confirm_button') }}</button>
<button type=\"submit\" class=\"btn btn-danger\">{{ __('app.delete_confirm_button') }}</button>
</form>
<a href=\"{{ route('{$this->table_name}.index', Request::only('q', 'page')) }}\" class=\"btn btn-link\">{{ __('app.cancel') }}</a>
</div>

4
tests/Generators/ViewsGeneratorTest.php

@ -183,10 +183,10 @@ 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', \${$this->single_model_var_name}) }}\" accept-charset=\"UTF-8\" onsubmit=\"return confirm(&quot;Are you sure to delete this?&quot;)\" class=\"del-form float-right\" style=\"display: inline;\">
<form method=\"POST\" action=\"{{ route('{$this->table_name}.destroy', \${$this->single_model_var_name}) }}\" accept-charset=\"UTF-8\" onsubmit=\"return confirm(&quot;{{ __('app.delete_confirm') }}&quot;)\" class=\"del-form float-right\" style=\"display: inline;\">
{{ csrf_field() }} {{ method_field('delete') }}
<input name=\"{$this->lang_name}_id\" type=\"hidden\" value=\"{{ \${$this->single_model_var_name}->id }}\">
<button title=\"Delete this item\" type=\"submit\" class=\"btn btn-danger\">{{ __('app.delete_confirm_button') }}</button>
<button type=\"submit\" class=\"btn btn-danger\">{{ __('app.delete_confirm_button') }}</button>
</form>
<a href=\"{{ route('{$this->table_name}.edit', \${$this->single_model_var_name}) }}\" class=\"btn btn-link\">{{ __('app.cancel') }}</a>
</div>

Loading…
Cancel
Save