{% if S_AJAX_REQUEST %}
<form class="iz-confirm iz-confirm--delete" action="{{ S_CONFIRM_ACTION }}" method="post">
	<h3 class="iz-confirm__title">{{ MESSAGE_TITLE }}</h3>
	<p class="iz-confirm__text">{{ MESSAGE_TEXT }}</p>

	{% if not S_SHADOW_TOPICS %}
		{% if not S_SOFTDELETED and S_ALLOWED_DELETE and S_ALLOWED_SOFTDELETE %}
			<div class="iz-field iz-field--choice">
				<label class="iz-choice" for="delete_permanent">
					<input class="iz-choice__input" id="delete_permanent" name="delete_permanent" type="checkbox" value="1" {{ S_CHECKED_PERMANENT }} />
					<span class="iz-choice__label">
						{% if S_TOPIC_MODE %}{{ DELETE_TOPIC_PERMANENTLY_EXPLAIN }}{% else %}{{ DELETE_POST_PERMANENTLY_EXPLAIN }}{% endif %}
					</span>
				</label>
			</div>
		{% endif %}

		<div class="iz-field">
			<label class="iz-label" for="delete_reason">{{ L_DELETE_REASON }}{{ L_COLON }}</label>
			<p class="iz-help">{{ L_DELETE_REASON_EXPLAIN }}</p>
			<input class="iz-input"
				   placeholder="{{ L_SOFT_DELETE_PLACEHOLDER }}"
				   type="text"
				   name="delete_reason"
				   id="delete_reason"
				   value=""
				   maxlength="120" />
		</div>
	{% endif %}

	<fieldset class="iz-confirm__actions">
		<input class="iz-btn iz-btn--primary" type="button" name="confirm" value="{{ L_YES }}" />
		<input class="iz-btn iz-btn--secondary" type="button" name="cancel" value="{{ L_NO }}" />
	</fieldset>
</form>
{% else %}

{% include 'overall_header.html' %}
<form id="confirm" class="iz-confirm iz-confirm--delete" action="{{ S_CONFIRM_ACTION }}" method="post">
	<section class="iz-card iz-card--confirm" aria-labelledby="iz-confirm-title">
		<header class="iz-card__header">
			<h2 class="iz-card__title" id="iz-confirm-title">{{ MESSAGE_TITLE }}</h2>
		</header>

		<div class="iz-card__body">
			<div class="iz-alert iz-alert--warning" role="alert">
				<p class="iz-confirm__text">{{ MESSAGE_TEXT }}</p>
			</div>

			{% if not S_SHADOW_TOPICS %}
				<fieldset class="iz-confirm__fieldset">
					{% if not S_SOFTDELETED and S_ALLOWED_DELETE and S_ALLOWED_SOFTDELETE %}
						<div class="iz-field iz-field--choice">
							<label class="iz-choice" for="delete_permanent">
								<input class="iz-choice__input" id="delete_permanent" name="delete_permanent" type="checkbox" value="1" {{ S_CHECKED_PERMANENT }} />
								<span class="iz-choice__label">
									{{ L_DELETE_PERMANENTLY }}{{ L_COLON }}
									<span class="iz-choice__hint">
										{% if S_TOPIC_MODE %}{{ L_DELETE_POST_PERMANENT }}&nbsp;({{ L_DELETE_POST_PERMANENT_WARN }})
										{% else %}{{ L_DELETE_POST_PERMANENT }}&nbsp;({{ L_DELETE_POST_PERMANENT_WARN }}){% endif %}
									</span>
								</span>
							</label>
						</div>

						<div class="iz-field">
							<label class="iz-label" for="delete_reason">{{ L_DELETE_REASON }}{{ L_COLON }}</label>
							<p class="iz-help">{{ L_DELETE_REASON_EXPLAIN }}</p>
							<input class="iz-input"
								   placeholder="{{ L_SOFT_DELETE_PLACEHOLDER }}"
								   type="text"
								   name="delete_reason"
								   id="delete_reason"
								   value=""
								   maxlength="120" />
						</div>
					{% endif %}
				</fieldset>
			{% endif %}

			<fieldset class="iz-confirm__actions">
				{{ S_HIDDEN_FIELDS }}
				<button class="iz-btn iz-btn--primary" type="submit" name="confirm" value="{{ L_YES }}">{{ L_YES }}</button>
				<button class="iz-btn iz-btn--secondary" type="submit" name="cancel" value="{{ L_NO }}">{{ L_NO }}</button>
			</fieldset>
		</div>
	</section>
</form>
{% include 'overall_footer.html' %}
{% endif %}
