<xf:title>{{ phrase('edit_message_in_conversation:') }} {$conversation.title}</xf:title>

<xf:breadcrumb href="{{ link('conversations') }}">{{ phrase('conversations') }}</xf:breadcrumb>
<xf:breadcrumb href="{{ link('conversations', $conversation) }}">{$conversation.title}</xf:breadcrumb>

<xf:form action="{{ link('conversations/messages/edit', $message) }}" ajax="true" class="block"
	data-xf-init="attachment-manager">

	<div class="block-container">
		<div class="block-body">
			<xf:editorrow name="message" value="{$message.message}" attachments="{$attachmentData.attachments}"
				rowtype="{{ $quickEdit ? 'fullWidth noLabel' : '' }}"
				label="{{ phrase('message') }}"
				data-preview-url="{{ link('conversations/messages/preview', $message) }}" />

			<xf:formrow rowtype="{{ $quickEdit ? 'fullWidth noLabel' : '' }}">
				<xf:if is="$attachmentData">
					<xf:macro template="helper_attach_upload" name="upload_block" arg-attachmentData="{$attachmentData}" />
				</xf:if>
			</xf:formrow>
		</div>
		<xf:submitrow icon="save" sticky="true" rowtype="{{ $quickEdit ? 'simple' : '' }}">
			<xf:html>
				<xf:if is="$quickEdit">
					<xf:button class="js-cancelButton" icon="cancel">{{ phrase('button.cancel') }}</xf:button>
				</xf:if>
			</xf:html>
		</xf:submitrow>
	</div>
</xf:form>