From 31a1031624fd35c0f07cc9357176b3e68681f0d6 Mon Sep 17 00:00:00 2001 From: James Cole Date: Fri, 1 May 2015 23:39:45 +0200 Subject: [PATCH] And delete is fixed. --- app/Providers/ConfigServiceProvider.php | 2 +- resources/twig/accounts/delete.twig | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/Providers/ConfigServiceProvider.php b/app/Providers/ConfigServiceProvider.php index a23a061d87..926e9363c4 100644 --- a/app/Providers/ConfigServiceProvider.php +++ b/app/Providers/ConfigServiceProvider.php @@ -170,7 +170,7 @@ class ConfigServiceProvider extends ServiceProvider ], 'Form' => [ 'is_safe' => [ - 'input','select','checkbox','model' + 'input','select','checkbox','model','open' ] ], ], diff --git a/resources/twig/accounts/delete.twig b/resources/twig/accounts/delete.twig index f6ee597cdb..ef7cea4dbb 100644 --- a/resources/twig/accounts/delete.twig +++ b/resources/twig/accounts/delete.twig @@ -1,36 +1,36 @@ {% extends "./layout/default.twig" %} {% block content %} -{!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $account) !!} -{!! Form::open(['class' => 'form-horizontal','id' => 'destroy','url' => route('accounts.destroy',$account->id)]) !!} +{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute().getName(), account) }} +{{ Form.open({'class' : 'form-horizontal','id' : 'destroy','url' : route('accounts.destroy',account.id)}) }}
- Delete account "{{{$account->name}}}" + Delete account "{{ account.name }}"

- 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}}"?

- @if($account->transactions()->count() > 0) + {% if account.transactions().count() > 0 %}

- {{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.

- @endif - @if($account->piggyBanks()->count() > 0) + {% endif %} + {% if account.piggyBanks().count() > 0 %}

- {{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.

- @endif + {% endif %}

- Cancel + Cancel

-{!! Form::close() !!} + {% endblock %}