{% include 'overall_header.html' %}

<header class="iz-sectionhead">
	<h1 class="iz-sectionhead__title">
		{% if S_REPORT_POST %}{{ L_REPORT_POST }}{% else %}{{ L_REPORT_MESSAGE }}{% endif %}
	</h1>
</header>

<form method="post" action="{{ S_REPORT_ACTION }}" id="report" class="iz-form">

	<section class="iz-card iz-card--report">
		<div class="iz-card__body">
			<p class="iz-hint">
				{% if S_REPORT_POST %}{{ L_REPORT_POST_EXPLAIN }}{% else %}{{ L_REPORT_MESSAGE_EXPLAIN }}{% endif %}
			</p>

			{% if ERROR %}
				<div class="iz-alert iz-alert--danger" role="alert">
					{{ ERROR }}
				</div>
			{% endif %}

			<fieldset class="iz-fieldset">
				<div class="iz-field">
					<label class="iz-label" for="reason_id">{{ L_REASON }}{{ L_COLON }}</label>
					<select class="iz-select" name="reason_id" id="reason_id">
						{% for reason in reason %}
							<option value="{{ reason.ID }}"{% if reason.S_SELECTED %} selected="selected"{% endif %}>{{ reason.DESCRIPTION }}</option>
						{% endfor %}
					</select>
				</div>

				{% if S_CAN_NOTIFY %}
					<div class="iz-field">
						<div class="iz-label">{{ L_REPORT_NOTIFY }}{{ L_COLON }}</div>
						<p class="iz-hint">{{ L_REPORT_NOTIFY_EXPLAIN }}</p>

						<div class="iz-choicegroup" role="radiogroup" aria-label="{{ L_REPORT_NOTIFY }}">
							<div class="iz-choice">
								<input type="radio" name="notify" id="notify1" value="1" {% if not S_NOTIFY %}checked="checked"{% endif %}>
								<label for="notify1">{{ L_YES }}</label>
							</div>
							<div class="iz-choice">
								<input type="radio" name="notify" id="notify0" value="0" {% if S_NOTIFY %}checked="checked"{% endif %}>
								<label for="notify0">{{ L_NO }}</label>
							</div>
						</div>
					</div>
				{% endif %}

				<div class="iz-field">
					<label class="iz-label" for="report_text">{{ L_MORE_INFO }}{{ L_COLON }}</label>
					<textarea
						rows="2"
						name="report_text"
						id="report_text"
						class="iz-textarea"
						placeholder="{{ L_MORE_INFO }}{{ L_ELLIPSIS }}{{ L_CAN_LEAVE_BLANK }}"
					>{{ REPORT_TEXT }}</textarea>
				</div>

				{% if CAPTCHA_TEMPLATE %}
					{% include '{{ CAPTCHA_TEMPLATE }}' %}
				{% endif %}
			</fieldset>
		</div>

		<div class="iz-card__footer">
			<div class="iz-actions">
				<button type="submit" name="cancel" class="iz-btn iz-btn--ghost" value="{{ L_CANCEL }}">
					{{ L_CANCEL }}
				</button>
				<button type="submit" name="submit" class="iz-btn iz-btn--primary" value="{{ L_SUBMIT }}">
					{{ L_SUBMIT }}
				</button>
			</div>

			{{ S_FORM_TOKEN }}
		</div>
	</section>

</form>

{% include 'overall_footer.html' %}
