{% include 'overall_header.html' %}

<h1>{{ lang('ACP_SEO_METADATA') }}</h1>
{{ lang('ACP_SEO_METADATA_EXPLAIN') }}

<div class="errorbox notice">
	<p>{{ lang('ACP_SEO_METADATA_INFO') }}</p>
</div>

{% if VALIDATION_ERRORS %}
<div class="errorbox">
	{% for ERROR in VALIDATION_ERRORS %}
	<p>{{ ERROR.MESSAGE }}</p>
	{% endfor %}
</div>
{% endif %}

<form id="seo_metadata_settings" method="POST" action="{{ U_ACTION }}">

	<fieldset>
		<legend>{{ lang('ACP_SEO_METADATA_GLOBAL_SETTINGS') }}</legend>
		<dl>
			<dt>
				<label for="seo_metadata_meta_description">{{ lang('ACP_SEO_METADATA_META_DESCRIPTION') ~ lang('COLON') }}</label>
				<br><span>{{ lang('ACP_SEO_METADATA_META_DESCRIPTION_EXPLAIN') }}</span>
			</dt>
			<dd>
				<label><input type="radio" id="seo_metadata_meta_description" name="seo_metadata_meta_description" value="1"{% if SEO_METADATA_META_DESCRIPTION %} checked="checked"{% endif %}> {{ lang('YES') }}</label>
				<label><input type="radio" name="seo_metadata_meta_description" value="0"{% if not SEO_METADATA_META_DESCRIPTION %} checked="checked"{% endif %}> {{ lang('NO') }}</label>
			</dd>
		</dl>
		<dl>
			<dt>
				<label for="seo_metadata_desc_length">{{ lang('ACP_SEO_METADATA_DESC_LENGTH') ~ lang('COLON') }}</label>
				<br><span>{{ lang('ACP_SEO_METADATA_DESC_LENGTH_EXPLAIN') }}</span>
			</dt>
			<dd>
				<input type="number" id="seo_metadata_desc_length" name="seo_metadata_desc_length" min="50" max="255" value="{% if not SEO_METADATA_DESC_LENGTH %}160{% else %}{{ SEO_METADATA_DESC_LENGTH }}{% endif %}">
			</dd>
		</dl>
		<dl>
			<dt>
				<label for="seo_metadata_desc_strategy">{{ lang('ACP_SEO_METADATA_DESC_STRATEGY') ~ lang('COLON') }}</label>
				<br><span>{{ lang('ACP_SEO_METADATA_DESC_STRATEGY_EXPLAIN') }}</span>
			</dt>
			<dd>
				<select id="seo_metadata_desc_strategy" name="seo_metadata_desc_strategy">
					{% for STRATEGY in SEO_METADATA_DESC_STRATEGIES %}
					<option value="{{ STRATEGY.VALUE }}"{% if STRATEGY.SELECTED %} selected="selected"{% endif %}>{{ STRATEGY.NAME }}</option>
					{% endfor %}
				</select>
			</dd>
		</dl>
		<dl>
			<dt>
				<label for="seo_metadata_image_strategy">{{ lang('ACP_SEO_METADATA_IMAGE_STRATEGY') ~ lang('COLON') }}</label>
				<br><span>{{ lang('ACP_SEO_METADATA_IMAGE_STRATEGY_EXPLAIN') }}</span>
			</dt>
			<dd>
				<select id="seo_metadata_image_strategy" name="seo_metadata_image_strategy">
					{% for STRATEGY in SEO_METADATA_IMAGE_STRATEGIES %}
					<option value="{{ STRATEGY.VALUE }}"{% if STRATEGY.SELECTED %} selected="selected"{% endif %}>{{ STRATEGY.NAME }}</option>
					{% endfor %}
				</select>
			</dd>
		</dl>
		<dl>
			<dt>
				<label for="seo_metadata_default_image">{{ lang('ACP_SEO_METADATA_DEFAULT_IMAGE') ~ lang('COLON') }}</label>
				<br><span>{{ lang('ACP_SEO_METADATA_DEFAULT_IMAGE_EXPLAIN', SEO_METADATA_MIN_IMAGE_DIMENSION, BOARD_IMAGES_URL) }}</span>
			</dt>
			<dd>
				<input type="text" id="seo_metadata_default_image" name="seo_metadata_default_image"{% if SEO_METADATA_DEFAULT_IMAGE %} value="{{ SEO_METADATA_DEFAULT_IMAGE }}"{% endif %} class="full">
			</dd>
		</dl>
		<dl>
			<dt>
				<label>{{ lang('ACP_SEO_METADATA_DEFAULT_IMAGE_DIMENSIONS') ~ lang('COLON') }}</label>
				<br><span>{{ lang('ACP_SEO_METADATA_DEFAULT_IMAGE_DIMENSIONS_EXPLAIN') ~ ' ' ~ lang('ACP_SEO_METADATA_EXTRACTED_IMAGE_DATA') }}</span>
			</dt>
			<dd>
				{% if SEO_METADATA_DEFAULT_IMAGE_WIDTH or SEO_METADATA_DEFAULT_IMAGE_HEIGHT %}
				<strong id="seo_metadata_default_image_width">{% if SEO_METADATA_DEFAULT_IMAGE_WIDTH %}{{ SEO_METADATA_DEFAULT_IMAGE_WIDTH }}{% else %}0{% endif %}</strong>
				x
				<strong id="seo_metadata_default_image_height">{% if SEO_METADATA_DEFAULT_IMAGE_HEIGHT %}{{ SEO_METADATA_DEFAULT_IMAGE_HEIGHT }}{% else %}0{% endif %}</strong>
				{{ lang('PIXEL') }}
				{% endif %}
			</dd>
		</dl>
		<dl>
			<dt>
				<label>{{ lang('ACP_SEO_METADATA_DEFAULT_IMAGE_TYPE') ~ lang('COLON') }}</label>
				<br><span>{{ lang('ACP_SEO_METADATA_DEFAULT_IMAGE_TYPE_EXPLAIN') ~ ' ' ~ lang('ACP_SEO_METADATA_EXTRACTED_IMAGE_DATA') }}</span>
			</dt>
			<dd>
				{% if SEO_METADATA_DEFAULT_IMAGE_TYPE %}<strong id="seo_metadata_default_image_type">{{ SEO_METADATA_DEFAULT_IMAGE_TYPE }}</strong>{% endif %}
			</dd>
		</dl>
		<dl>
			<dt>
				<label for="seo_metadata_local_images">{{ lang('ACP_SEO_METADATA_LOCAL_IMAGES') ~ lang('COLON') }}</label>
				<br><span>{{ lang('ACP_SEO_METADATA_LOCAL_IMAGES_EXPLAIN', SERVER_NAME) }}</span>
			</dt>
			<dd>
				<label><input type="radio" id="seo_metadata_local_images" name="seo_metadata_local_images" value="1"{% if SEO_METADATA_LOCAL_IMAGES %} checked="checked"{% endif %}{% if not SERVER_NAME %} disabled="disabled"{% endif %}> {{ lang('YES') }}</label>
				<label><input type="radio" name="seo_metadata_local_images" value="0"{% if not SEO_METADATA_LOCAL_IMAGES %} checked="checked"{% endif %}{% if not SERVER_NAME %} disabled="disabled"{% endif %}> {{ lang('NO') }}</label>
			</dd>
		</dl>
		<dl>
			<dt>
				<label for="seo_metadata_attachments">{{ lang('ACP_SEO_METADATA_ATTACHMENTS') ~ lang('COLON') }}</label>
				<br><span>{{ lang('ACP_SEO_METADATA_ATTACHMENTS_EXPLAIN') }}</span>
			</dt>
			<dd>
				<label><input type="radio" id="seo_metadata_attachments" name="seo_metadata_attachments" value="1"{% if SEO_METADATA_ATTACHMENTS %} checked="checked"{% endif %}> {{ lang('YES') }}</label>
				<label><input type="radio" name="seo_metadata_attachments" value="0"{% if not SEO_METADATA_ATTACHMENTS %} checked="checked"{% endif %}> {{ lang('NO') }}</label>
			</dd>
		</dl>
		<dl>
			<dt>
				<label for="seo_metadata_prefer_attachments">{{ lang('ACP_SEO_METADATA_PREFER_ATTACHMENTS') ~ lang('COLON') }}</label>
				<br><span>{{ lang('ACP_SEO_METADATA_PREFER_ATTACHMENTS_EXPLAIN') }}</span>
			</dt>
			<dd>
				<label><input type="radio" id="seo_metadata_prefer_attachments" name="seo_metadata_prefer_attachments" value="1"{% if SEO_METADATA_PREFER_ATTACHMENTS %} checked="checked"{% endif %}> {{ lang('YES') }}</label>
				<label><input type="radio" name="seo_metadata_prefer_attachments" value="0"{% if not SEO_METADATA_PREFER_ATTACHMENTS %} checked="checked"{% endif %}> {{ lang('NO') }}</label>
			</dd>
		</dl>
		<dl>
			<dt>
				<label for="seo_metadata_post_metadata">{{ lang('ACP_SEO_METADATA_POST_METADATA') ~ lang('COLON') }}</label>
				<br><span>{{ lang('ACP_SEO_METADATA_POST_METADATA_EXPLAIN') }}</span>
			</dt>
			<dd>
				<label><input type="radio" id="seo_metadata_post_metadata" name="seo_metadata_post_metadata" value="1"{% if SEO_METADATA_POST_METADATA %} checked="checked"{% endif %}> {{ lang('YES') }}</label>
				<label><input type="radio" name="seo_metadata_post_metadata" value="0"{% if not SEO_METADATA_POST_METADATA %} checked="checked"{% endif %}> {{ lang('NO') }}</label>
			</dd>
		</dl>
		<dl>
			<dt>
				<label for="seo_metadata_max_images">{{ lang('ACP_SEO_METADATA_MAX_IMAGES') ~ lang('COLON') }}</label>
				<br><span>{{ lang('ACP_SEO_METADATA_MAX_IMAGES_EXPLAIN', SEO_METADATA_MAX_IMAGES_DEFAULT) }}</span>
			</dt>
			<dd>
				<input type="number" id="seo_metadata_max_images" name="seo_metadata_max_images" min="1" max="{{ SEO_METADATA_MAX_IMAGES_DEFAULT }}" value="{% if SEO_METADATA_MAX_IMAGES %}{{ SEO_METADATA_MAX_IMAGES }}{% else %}{{ SEO_METADATA_MAX_IMAGES_DEFAULT }}{% endif %}">
			</dd>
		</dl>
	</fieldset>

	<fieldset>
		<legend>{{ lang('ACP_SEO_METADATA_OPEN_GRAPH_SETTINGS') }}</legend>
		<dl>
			<dt>
				<label for="seo_metadata_open_graph">{{ lang('ACP_SEO_METADATA_OPEN_GRAPH') ~ lang('COLON') }}</label>
				<br><span>{{ lang('ACP_SEO_METADATA_DATA_EXPLAIN') }}</span>
			</dt>
			<dd>
				<label><input type="radio" id="seo_metadata_open_graph" name="seo_metadata_open_graph" value="1"{% if SEO_METADATA_OPEN_GRAPH %} checked="checked"{% endif %}> {{ lang('YES') }}</label>
				<label><input type="radio" name="seo_metadata_open_graph" value="0"{% if not SEO_METADATA_OPEN_GRAPH %} checked="checked"{% endif %}> {{ lang('NO') }}</label>
			</dd>
		</dl>
		<dl>
			<dt>
				<label for="seo_metadata_facebook_application">{{ lang('ACP_SEO_METADATA_FACEBOOK_APPLICATION') ~ lang('COLON') }}</label>
				<br><span>{{ lang('ACP_SEO_METADATA_FACEBOOK_APPLICATION_EXPLAIN') }}</span>
			</dt>
			<dd>
				<input type="text" id="seo_metadata_facebook_application" name="seo_metadata_facebook_application"{% if SEO_METADATA_FACEBOOK_APPLICATION %} value="{{ SEO_METADATA_FACEBOOK_APPLICATION }}"{% endif %} class="narrow">
			</dd>
		</dl>
		<dl>
			<dt>
				<label for="seo_metadata_facebook_publisher">{{ lang('ACP_SEO_METADATA_FACEBOOK_PUBLISHER') ~ lang('COLON') }}</label>
				<br><span>{{ lang('ACP_SEO_METADATA_FACEBOOK_PUBLISHER_EXPLAIN') }}</span>
			</dt>
			<dd>
				<input type="url" id="seo_metadata_facebook_publisher" name="seo_metadata_facebook_publisher"{% if SEO_METADATA_FACEBOOK_PUBLISHER %} value="{{ SEO_METADATA_FACEBOOK_PUBLISHER }}"{% endif %} class="full">
			</dd>
		</dl>
	</fieldset>

	<fieldset>
		<legend>{{ lang('ACP_SEO_METADATA_TWITTER_CARD_SETTINGS') }}</legend>
		<dl>
			<dt>
				<label for="seo_metadata_twitter_cards">{{ lang('ACP_SEO_METADATA_TWITTER_CARDS') ~ lang('COLON') }}</label>
				<br><span>{{ lang('ACP_SEO_METADATA_DATA_EXPLAIN') }}</span>
			</dt>
			<dd>
				<label><input type="radio" id="seo_metadata_twitter_cards" name="seo_metadata_twitter_cards" value="1"{% if SEO_METADATA_TWITTER_CARDS %} checked="checked"{% endif %}> {{ lang('YES') }}</label>
				<label><input type="radio" name="seo_metadata_twitter_cards" value="0"{% if not SEO_METADATA_TWITTER_CARDS %} checked="checked"{% endif %}> {{ lang('NO') }}</label>
			</dd>
		</dl>
		<dl>
			<dt>
				<label for="seo_metadata_twitter_publisher">{{ lang('ACP_SEO_METADATA_TWITTER_PUBLISHER') ~ lang('COLON') }}</label>
				<br><span>{{ lang('ACP_SEO_METADATA_TWITTER_PUBLISHER_EXPLAIN') }}</span>
			</dt>
			<dd>
				<input type="text" id="seo_metadata_twitter_publisher" name="seo_metadata_twitter_publisher"{% if SEO_METADATA_TWITTER_PUBLISHER %} value="{{ SEO_METADATA_TWITTER_PUBLISHER }}"{% endif %} class="narrow">
			</dd>
		</dl>
	</fieldset>

	<fieldset>
		<legend>{{ lang('ACP_SEO_METADATA_JSON_LD_SETTINGS') }}</legend>
		<dl>
			<dt>
				<label for="seo_metadata_json_ld">{{ lang('ACP_SEO_METADATA_JSON_LD') ~ lang('COLON') }}</label>
				<br><span>{{ lang('ACP_SEO_METADATA_DATA_EXPLAIN') }}</span>
			</dt>
			<dd>
				<label><input type="radio" id="seo_metadata_json_ld" name="seo_metadata_json_ld" value="1"{% if SEO_METADATA_JSON_LD %} checked="checked"{% endif %}> {{ lang('YES') }}</label>
				<label><input type="radio" name="seo_metadata_json_ld" value="0"{% if not SEO_METADATA_JSON_LD %} checked="checked"{% endif %}> {{ lang('NO') }}</label>
			</dd>
		</dl>
		<dl>
			<dt>
				<label for="seo_metadata_json_ld_logo">{{ lang('ACP_SEO_METADATA_JSON_LD_LOGO') ~ lang('COLON') }}</label>
				<br><span>{{ lang('ACP_SEO_METADATA_JSON_LD_LOGO_EXPLAIN', BOARD_IMAGES_URL) }}</span>
			</dt>
			<dd>
				<input type="text" id="seo_metadata_json_ld_logo" name="seo_metadata_json_ld_logo"{% if SEO_METADATA_JSON_LD_LOGO %} value="{{ SEO_METADATA_JSON_LD_LOGO }}"{% endif %} class="full">
			</dd>
		</dl>
		<dl>
			<dt>
				<label>{{ lang('ACP_SEO_METADATA_JSON_LD_LOGO_DIMENSIONS') ~ lang('COLON') }}</label>
				<br><span>{{ lang('ACP_SEO_METADATA_JSON_LD_LOGO_DIMENSIONS_EXPLAIN') ~ ' ' ~ lang('ACP_SEO_METADATA_EXTRACTED_IMAGE_DATA') }}</span>
			</dt>
			<dd>
				{% if SEO_METADATA_JSON_LD_LOGO_WIDTH or SEO_METADATA_JSON_LD_LOGO_HEIGHT %}
				<strong id="seo_metadata_json_ld_logo_width">{% if SEO_METADATA_JSON_LD_LOGO_WIDTH %}{{ SEO_METADATA_JSON_LD_LOGO_WIDTH }}{% else %}0{% endif %}</strong>
				x
				<strong id="seo_metadata_json_ld_logo_height">{% if SEO_METADATA_JSON_LD_LOGO_HEIGHT %}{{ SEO_METADATA_JSON_LD_LOGO_HEIGHT }}{% else %}0{% endif %}</strong>
				{{ lang('PIXEL') }}
				{% endif %}
			</dd>
		</dl>
	</fieldset>

	<fieldset>
		<legend>{{ lang('ACP_SUBMIT_CHANGES') }}</legend>
		<p class="submit-buttons">
			<input type="reset" class="button2" value="{{ lang('RESET') }}">
			<input type="submit" name="submit" class="button1" value="{{ lang('SUBMIT') }}">
		</p>
	</fieldset>

	{{ S_FORM_TOKEN }}
</form>

{% include 'overall_footer.html' %}
