{% extends "Froxlor/userarea.html.twig" %}

{% block content %}

	<form action="{{ action|default("") }}" method="post" enctype="application/x-www-form-urlencoded" class="form">

		<div class="alert alert-warning" role="alert">
			<h4 class="alert-heading">{{ lng('panel.security_question') }}</h4>
			<p>{{ question|raw }}</p>
			{% if with_checkbox is defined and with_checkbox is iterable %}
				{% if with_checkbox.show %}
					<div class="form-check form-switch">
						<input class="form-check-input" type="checkbox" id="delete_userfiles" name="delete_userfiles" value="1">
						<label class="form-check-label" for="delete_userfiles">{{ with_checkbox.chk_text|raw }}</label>
					</div>
				{% else %}
					<input type="hidden" name="delete_userfiles" value="0"/>
				{% endif %}
			{% endif %}
			<p>
				<input type="hidden" name="csrf_token" value="{{ csrf_token }}"/>
				<input type="hidden" name="send" value="send"/>
				{% for id,field in url_params %}
					<input type="hidden" name="{{ id }}" value="{{ field }}"/>
				{% endfor %}
				<button class="btn btn-danger" type="submit" name="submitbutton">{{ lng('panel.yes') }}</button>&nbsp;
				{% if back_link is defined and back_link is iterable and back_link|length > 0 %}
					<a href="{{ linker(back_link) }}" class="btn btn-secondary">{{ lng('panel.no') }}</a>
				{% else %}
					<a href="javascript:history.back(-1)" class="btn btn-secondary">{{ lng('panel.no') }}</a>
				{% endif %}
			</p>
		</div>

	</form>

{% endblock %}
