<xf:title>{{ phrase('message_users') }}</xf:title>
<xf:description>{{ phrase('message_users_description') }}</xf:description>

<xf:if is="$sent">
	<div class="blockMessage blockMessage--success blockMessage--iconic">
		{{ phrase('your_conversation_was_started_with_x_users', {'sent': $sent|number}) }}
	</div>
</xf:if>

<xf:form action="{{ link('users/message/confirm') }}" class="block">
	<div class="block-container">
		<div class="block-body">
			<xf:textboxrow name="from_user" value="{$xf.visitor.username}" ac="single"
				label="{{ phrase('from_user') }}">

				<xf:explain>
					<p>{{ phrase('enter_name_of_existing_user_conversation_should_be_started_by') }}</p>
					<p><b>{{ phrase('note:') }}</b> {{ phrase('you_cannot_start_conversation_with_yourself') }}</p>
				</xf:explain>
			</xf:textboxrow>

			<hr class="formRowSep" />

			<xf:textboxrow name="message_title" maxlength="100"
				label="{{ phrase('conversation_title') }}"
				required="true" />

			<xf:textarearow name="message_body" rows="5" autosize="true"
				label="{{ phrase('conversation_message') }}"
				required="true"
				hint="{{ phrase('you_may_use_bb_code') }}"
				explain="{{ phrase('following_placeholders_will_be_replaced_in_message_for_conversation') }} {{ phrase('you_may_also_use_phrase_title_which_will_be_replaced') }}" />

			<hr class="formRowSep" />

			<xf:checkboxrow label="{{ phrase('conversation_options') }}">
				<xf:option name="open_invite" value="1">{{ phrase('allow_anyone_in_conversation_to_invite_others') }}</xf:option>
				<xf:option name="conversation_locked" value="1">{{ phrase('lock_conversation_no_responses_will_be_allowed') }}</xf:option>
			</xf:checkboxrow>

			<xf:radiorow name="delete_type"
				label="{{ phrase('future_message_handling') }}">

				<xf:option selected="true"
					label="{{ phrase('do_not_leave_conversation') }}"
					explain="{{ phrase('remain_in_inbox_and_notified_of_replies') }}" />
				<xf:option value="deleted"
					label="{{ phrase('leave_conversation_and_accept_future_messages') }}"
					explain="{{ phrase('should_conversation_receive_responses_restored_to_inbox') }}" />
				<xf:option value="deleted_ignored"
					label="{{ phrase('leave_conversation_and_ignore_future_messages') }}"
					explain="{{ phrase('not_notified_of_responses_conversation_remain_deleted') }}" />
			</xf:radiorow>
		</div>

		<h2 class="block-formSectionHeader"><span class="block-formSectionHeader-aligner">{{ phrase('user_criteria') }}</span></h2>
		<div class="block-body">
			<xf:include template="helper_user_search_criteria" />
		</div>

		<xf:submitrow submit="{{ phrase('proceed...') }}" sticky="true" />
	</div>
</xf:form>