Better (and translated) delete forms. [skip ci]

This commit is contained in:
James Cole
2015-05-14 16:32:35 +02:00
parent 149a6f92b0
commit 353e96d951
8 changed files with 123 additions and 84 deletions

View File

@@ -3,26 +3,29 @@
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, budget) }}
{{ Form.open({'class' : 'form-horizontal','id' : 'destroy','url' : route('budgets.destroy',budget.id) }) }}
<div class="row">
<div class="col-lg-6 col-md-12 col-sm-12">
<div class="col-lg-6 col-lg-offset-3 col-md-12 col-sm-12">
<div class="panel panel-red">
<div class="panel-heading">
Delete budget "{{ budget.name}}"
<i class="fa fa-exclamation-circle"></i>
{{ trans('form.delete_budget', {'name': budget.name}) }}
</div>
<div class="panel-body">
<p class="text-danger">
{{ trans('form.permDeleteWarning') }}
</p>
<p>
Are you sure that you want to delete budget "{{ budget.name }}"?
{{ trans('form.budget_areYouSure', {'name': budget.name}) }}
</p>
{% if budget.transactionjournals|length > 0 %}
<p class="text-info">
Budget "{{ budget.name }}" still has {{ budget.transactionjournals|length }} transactions connected
to it. These will <strong>not</strong> be removed but will lose their connection to this budget.
</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 >
<input type="submit" name="submit" value="{{ trans('form.deletePermanently') }}" class="btn btn-danger" />
<a href="{{URL.previous()}}" class="btn-default btn">{{ trans('form.cancel') }}</a >
</p>
<p class="small">
{% if budget.transactionjournals|length > 0 %}
{{ Lang.choice('form.budget_keep_transactions', budget.transactionjournals|length) }}
{% endif %}
</p>
</div>
</div>