<xf:title>{$option.title}</xf:title>

<xf:form action="{{ link('options/email-handler-oauth', $option) }}" ajax="true" class="block">
	<div class="block-container">
		<div class="block-body">
			<xf:inforow>
				{{ phrase('you_will_need_to_navigate_to_microsoft_azure_portal_and_register:') }}
				<div><code>{$redirectUri}</code></div>
			</xf:inforow>

			<xf:textboxrow name="client_id" value="{$option.option_value.oauth.client_id}"
				label="{{ phrase('client_id') }}"
				explain="{{ phrase('you_can_get_client_id_via_microsoft_azure_portal') }}"
				required="required" />

			<xf:textboxrow name="client_secret"
				label="{{ phrase('client_secret') }}"
				explain="{{ phrase('secret_that_corresponds_to_your_azure_client_id_above') }}"
				required="required" />

			<xf:radiorow label="{{ phrase('connection_type') }}" name="type" value="{{ $option.option_value.type ?: 'pop3' }}">
				<xf:option value="pop3">POP3</xf:option>
				<xf:option value="imap">IMAP</xf:option>
			</xf:radiorow>

			<xf:inforow>
				{{ phrase('continuing_will_redirect_you_to_microsoft_to_confirm_account_you_want') }}
			</xf:inforow>
		</div>
		<xf:submitrow sticky="true" submit="{{ phrase('continue') }}" />
	</div>
	<xf:hiddenval name="oauth_provider">microsoft</xf:hiddenval>
</xf:form>