{% extends 'wizard/slides/common/base.twig' %}

{% block slide_body %}
	{{ icwp_macros.slideTitle( 'Setup Google Authenticator' ) }}

	<p>Google Authenticator is a popular choice for 2FA. It has 1 drawback, however - if you'll lose
	   your phone or reset it, you lose all your 2FA login codes.</p>
	<p>There is a solution to this and we <strong>strongly recommend</strong> that you do it: .</p>
	<p>Once you're ready to proceed with Google Authenticator, please scan the barcode below, and enter
	   code to confirm.</p>
	<p>Note: Turning on Google Authenticator for your user account will make the option available
	   to turn it on for all users on the site.</p>

	<h5>Register Google Authenticator On Your Account</h5>

	{% if flags.has_ga %}
		<p>It looks like Google Authenticator is already configured for your WordPress account so
		   no need to set that up again.</p>
	{% else %}
		<p>Scan the barcode below and enter the 6-digit code to register.</p>
	{% endif %}

	<form class="form-horizontal icwp-wizard-form" id>

		{% if flags.has_ga %}

			{% set radiovalues =
					{
						'Y': '<span>Turn On</span> - Enable Google Authenticator',
						'N': '<span>Turn Off</span> - Disable Google Authenticator'
					}
				%}
			{{ icwp_macros.formInput_Radio( 'enablega', radiovalues, 'Turn On Google Authenticator' ) }}
			{{ icwp_macros.formInput_Hidden( 'gacode', 'ignore' ) }}

			<span id="helpBlock" class="help-block">
				When enabled, this will allow any user of this site to configure and
				use Google Authenticator on their own WordPress account.
			</span>
		{% else %}

			<div class="form-group row">
				<label class="col-4 col-form-label">Scan your unique code</label>
				<div class="col-8">
					<img src="{{ hrefs.ga_chart }}" />
				</div>
			</div>

			{{ icwp_macros.formInput_Text( 'gacode', '', 'Authenticator Code', '', '6 digits long' ) }}
			{{ icwp_macros.formInput_Hidden( 'enablega', 'Y' ) }}
		{% endif %}

		{{ icwp_macros.formInput_Hidden( 'wizard-step', 'authga' ) }}
		{{ icwp_macros.formInput_Submit( 'Configure Google Authenticator' ) }}
	</form>
{% endblock %}