{% extends "base.html" %}
{% block title %}Remove {{ account }}{% endblock %}

{% block content %}
<h2>Remove {{ account }}</h2>

{% ifequal transaction_count 0 %}
	<form id="remove-account" action="" method="post" accept-charset="utf-8">
		<div id='remove-message'>Are you sure you want to remove {{ account }}?</div>
		<div class='submit'>
			<input type='button' value='Cancel' onclick='history.go(-1)' />
			&nbsp;
			<input type='submit' name='submit' value='Remove &rarr;' />
		</div>
	</form>
{% else %}
	<p id='remove-account-warning'>
		{{ account.name }} ({{ account.number }}) contains {{ transaction_count }} transactions. All 
		transactions must be assigned to another account before removing {{ account.name }}.
	</p>
	<p>
		Return to <a href='{% url list_accounts %}'>Accounts</a> or {{ account.name }}'s <a href='{% url single_account_ledger account_id=account.id %}'>Ledger</a> to review the transactions.
	</p>
{% endifequal %}

{% endblock %}
