And delete is fixed.

This commit is contained in:
James Cole
2015-05-01 23:39:45 +02:00
parent f8e9ce0d52
commit 31a1031624
2 changed files with 13 additions and 13 deletions

View File

@@ -170,7 +170,7 @@ class ConfigServiceProvider extends ServiceProvider
], ],
'Form' => [ 'Form' => [
'is_safe' => [ 'is_safe' => [
'input','select','checkbox','model' 'input','select','checkbox','model','open'
] ]
], ],
], ],

View File

@@ -1,36 +1,36 @@
{% extends "./layout/default.twig" %} {% extends "./layout/default.twig" %}
{% block content %} {% block content %}
{!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $account) !!} {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute().getName(), account) }}
{!! Form::open(['class' => 'form-horizontal','id' => 'destroy','url' => route('accounts.destroy',$account->id)]) !!} {{ Form.open({'class' : 'form-horizontal','id' : 'destroy','url' : route('accounts.destroy',account.id)}) }}
<div class="row"> <div class="row">
<div class="col-lg-6 col-md-12 col-sm-12"> <div class="col-lg-6 col-md-12 col-sm-12">
<div class="panel panel-red"> <div class="panel panel-red">
<div class="panel-heading"> <div class="panel-heading">
Delete account "{{{$account->name}}}" Delete account "{{ account.name }}"
</div> </div>
<div class="panel-body"> <div class="panel-body">
<p> <p>
Are you sure that you want to delete the {{strtolower($account->accountType->type)}} "{{$account->name}}"? Are you sure that you want to delete the {{account.accountType.type|lower}} "{{account.name}}"?
</p> </p>
@if($account->transactions()->count() > 0) {% if account.transactions().count() > 0 %}
<p class="text-danger"> <p class="text-danger">
{{ucfirst($account->accountType->type)}} "{{{$account->name}}}" still has {{$account->transactions()->count()}} transaction(s) associated to it. These will be deleted as well. {{account.accountType.type|capitalize}} "{{ account.name }}" still has {{account.transactions().count()}} transaction(s) associated to it. These will be deleted as well.
</p> </p>
@endif {% endif %}
@if($account->piggyBanks()->count() > 0) {% if account.piggyBanks().count() > 0 %}
<p class="text-danger"> <p class="text-danger">
{{ucfirst($account->accountType->type)}} "{{{$account->name}}}" still has {{$account->piggyBanks()->count()}} piggy bank(s) associated to it. These will be deleted as well. {{account.accountType.type|capitalize}} "{{ account.name }}" still has {{account.piggyBanks().count()}} piggy bank(s) associated to it. These will be deleted as well.
</p> </p>
@endif {% endif %}
<p> <p>
<button type="submit" class="btn btn-default btn-danger">Delete permanently</button> <button type="submit" class="btn btn-default btn-danger">Delete permanently</button>
<a href="{{URL::previous()}}" class="btn-default btn">Cancel</a > <a href="{{URL.previous()}}" class="btn-default btn">Cancel</a >
</p> </p>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
{!! Form::close() !!} </form>
{% endblock %} {% endblock %}