<div class="form">

<form method="post" id="{{_form}}">

<p><strong>{"Login methods"}:</strong><br />
<input type="checkbox" name="login_facebook" id="login_facebook" value="yes"{% if login_facebook %} checked{% end %} /> {"Facebook"}<br />
<input type="checkbox" name="login_google" id="login_google"value="yes"{% if login_google %} checked{% end %} /> {"Google"}<br />
<input type="checkbox" name="login_openid" id="login_openid" value="yes"{% if login_openid %} checked{% end %} /> {"OpenID"}<br />
<input type="checkbox" name="login_twitter" id="login_twitter" value="yes"{% if login_twitter %} checked{% end %} /> {"Twitter"}<br />
<input type="checkbox" name="login_persona" id="login_persona" value="yes"{% if login_persona %} checked{% end %} /> {"Persona"}<br />

<p>{"2-factor authentication"}:<br />
	<select name="_2fa">
		<option value="optional"{% if _2fa == 'optional' %} selected{% end %}>Optional (user decides)</option>
		<option value="admin"{% if _2fa == 'admin' %} selected{% end %}>Required for admin users</option>
		<option value="all"{% if _2fa == 'all' %} selected{% end %}>Required for all users</option>
</select></p>

<p>{"Default member role"}:<br />
<select name="default_role">
{% foreach roles %}
	<option value="{{ loop_value }}"{% if default_role === $data->loop_value %} selected {% end %}>{{ loop_value|ucfirst }}</option>
{% end %}
</select></p>

<div id="facebook-info">

<p>
	<strong>{"Facebook app settings"}</strong><br />
	<a href="https://developers.facebook.com/apps" target="_blank">{"Register your website here to generate your Facebook credentials."}</a>
</p>

<p>{"Application ID"}:<br />
<input type="text" name="facebook_app_id" size="40" value="{{ facebook_app_id|quotes }}" />
</p>

<p>{"Application secret"}:<br />
<input type="text" name="facebook_app_secret" size="70" value="{{ facebook_app_secret|quotes }}" />
</p>
</div>

<div id="google-info">

<p>
	<strong>{"Google app settings"}</strong><br />
	<a href="https://developers.google.com/api-client-library/php/auth/web-app#creatingcred" target="_blank">{"Register your website here to generate your Google credentials."}</a>
</p>

<p>{"OAuth client ID"}:<br />
<input type="text" name="google_oauth_client_id" size="40" value="{{ google_oauth_client_id|quotes }}" />
</p>

<p>{"OAuth client secret"}:<br />
<input type="text" name="google_oauth_client_secret" size="70" value="{{ google_oauth_client_secret|quotes }}" />
</p>
</div>

<div id="twitter-info">

<p>
	<strong>{"Twitter app settings"}</strong><br />
	<a href="https://dev.twitter.com/apps/new" target="_blank">{"Register your website here to generate your Twitter credentials."}</a>
</p>

<p>{"Twitter ID"}:<br />
<input type="text" name="twitter_id" size="40" value="{{ twitter_id|quotes }}" />
</p>

<p>{"Consumer key"}:<br />
<input type="text" name="twitter_key" size="40" value="{{ twitter_key|quotes }}" />
</p>

<p>{"Consumer secret"}:<br />
<input type="text" name="twitter_secret" size="70" value="{{ twitter_secret|quotes }}" />
</p>

<p>{"Access token (optional)"}:<br />
<input type="text" name="twitter_access_token" size="70" value="{{ twitter_access_token|quotes }}" />
</p>

<p>{"Access token secret (optional)"}:<br />
<input type="text" name="twitter_access_token_secret" size="70" value="{{ twitter_access_token_secret|quotes }}" />
</p>
</div>

<p>
	<input type="submit" value="{"Save Settings"}" />
	&nbsp;
	<a href="/user/admin" onclick="return confirm ('{"Are you sure you want to cancel and lose any changes?"}')">{"Cancel"}</a>
</p>

</form>

</div>
