firefly-iii/resources/views/accounts/delete.blade.php
2015-04-03 22:54:21 +02:00

37 lines
1.6 KiB
PHP

@extends('layouts.default')
@section('content')
{!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $account) !!}
{!! Form::open(['class' => 'form-horizontal','id' => 'destroy','url' => route('accounts.destroy',$account->id)]) !!}
<div class="row">
<div class="col-lg-6 col-md-12 col-sm-12">
<div class="panel panel-red">
<div class="panel-heading">
Delete account "{{{$account->name}}}"
</div>
<div class="panel-body">
<p>
Are you sure that you want to delete the {{strtolower($account->accountType->type)}} "{{$account->name}}"?
</p>
@if($account->transactions()->count() > 0)
<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.
</p>
@endif
@if($account->piggyBanks()->count() > 0)
<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.
</p>
@endif
<p>
<button type="submit" class="btn btn-default btn-danger">Delete permanently</button>
<a href="{{URL::previous()}}" class="btn-default btn">Cancel</a >
</p>
</div>
</div>
</div>
</div>
{!! Form::close() !!}
@stop