<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('email_setup_explain:') }}
				<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('google_client_id_explain') }}"
				required="required" />

			<xf:textboxrow name="client_secret"
				label="{{ phrase('client_secret') }}"
				explain="{{ phrase('secret_that_corresponds_to_your_google_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_google_to_confirm_account_you_want_to') }}
			</xf:inforow>
		</div>
		<xf:submitrow sticky="true" submit="{{ phrase('continue') }}" />
	</div>
</xf:form>