<xf:title>{{ phrase('confirm_sending_email') }}</xf:title>

<xf:if is="$tested">
	<div class="blockMessage blockMessage--success blockMessage--iconic">{{ phrase('test_email_sent_to_x', {'email': $xf.visitor.email}) }}</div>
</xf:if>

<xf:form action="{{ link('users/email/send') }}" class="block">
	<div class="block-container">
		<div class="block-body">
			<xf:formrow label="{{ phrase('number_of_users_matching_criteria') }}">
				{$total|number}
				<span role="presentation" aria-hidden="true">&middot;</span>
				<a href="{{ link('users/list', null, {'criteria': $criteria}) }}">{{ phrase('view_full_list') }}</a>
			</xf:formrow>
			<xf:formrow label="{{ phrase('test') }}">
				<xf:button type="submit" name="test" value="1" class="button">{{ phrase('send_test') }}</xf:button>
			</xf:formrow>
		</div>
		<xf:submitrow submit="{{ phrase('send') }}" />
	</div>

	<xf:hiddenval name="json_criteria">{$criteria|json}</xf:hiddenval>

	<xf:hiddenval name="total">{$total}</xf:hiddenval>

	<xf:hiddenval name="from_name">{$email.from_name}</xf:hiddenval>
	<xf:hiddenval name="from_email">{$email.from_email}</xf:hiddenval>

	<xf:hiddenval name="email_title">{$email.email_title}</xf:hiddenval>
	<xf:hiddenval name="email_format">{$email.email_format}</xf:hiddenval>
	<xf:hiddenval name="email_body">{$email.email_body}</xf:hiddenval>
	<xf:hiddenval name="email_wrapped">{$email.email_wrapped}</xf:hiddenval>
	<xf:hiddenval name="email_unsub">{$email.email_unsub}</xf:hiddenval>
</xf:form>