{% include 'simple_header.html' %}

<div class="iz-page">

	<header class="iz-pagehead" aria-labelledby="iz-im-title">
		<h2 class="iz-pagehead__title" id="iz-im-title">{{ L_SEND_IM }}</h2>
		<p class="iz-pagehead__lead">{{ L_SEND_IM_EXPLAIN }}</p>
	</header>

	<form method="post" action="{{ S_IM_ACTION }}" class="iz-form">

		<section class="iz-card" aria-labelledby="iz-im-details-title">
			<header class="iz-card__header">
				<h3 class="iz-card__title" id="iz-im-details-title">{{ L_OPTIONS }}</h3>
			</header>

			<div class="iz-card__body">

				{% if S_SENT_JABBER %}
					<p class="iz-alert iz-alert--info" role="status">{{ L_IM_SENT_JABBER }}</p>
				{% endif %}

				<div class="iz-field">
					<div class="iz-label">{{ L_IM_RECIPIENT }}{{ L_COLON }}</div>
					<div class="iz-meta">
						<strong>{{ USERNAME }}</strong>
						{% if S_NO_SEND_JABBER %}&nbsp;&#91;&nbsp;{{ IM_CONTACT }}&nbsp;&#93;{% endif %}
						{% if PRESENCE_IMG %}&nbsp;{{ PRESENCE_IMG }}{% endif %}
					</div>
				</div>

				{% if S_SEND_JABBER %}
					<div class="iz-field">
						<label class="iz-label" for="message">{{ L_IM_MESSAGE }}{{ L_COLON }}</label>
						<textarea class="iz-textarea" name="message" id="message" rows="6" cols="45"></textarea>
					</div>

					<fieldset class="iz-actions iz-actions--inline">
						<button class="iz-btn iz-btn--primary" name="submit" type="submit" value="{{ L_IM_SEND }}">
							{{ L_IM_SEND }}
						</button>
						{{ S_FORM_TOKEN }}
					</fieldset>

					{% if S_SENT_JABBER %}
						<p class="iz-meta">{{ L_IM_SENT_JABBER }}</p>
					{% endif %}

				{% elseif S_NO_SEND_JABBER %}
					<p class="iz-alert iz-alert--warn" role="status">{{ L_IM_NO_JABBER }}</p>
					{{ S_FORM_TOKEN }}
				{% endif %}

			</div>
		</section>

	</form>

	<p class="iz-meta">
		<a class="iz-link" href="#" onclick="window.close(); return false;">{{ L_CLOSE_WINDOW }}</a>
	</p>

</div>

{% include 'simple_footer.html' %}
