{% extends 'layout.twig' %}

{% block content %}
{% if font.id is empty %}
	<h1>Nothing selected to delete.</h1>
	<p><a href="?page=fontsampler">Back without deleting.</a></p>
{% else %}
	{#TODO check and list if this font is in use in any fontsamplers#}
	<h1>Do you really want to delete the Fontset {{ font.name }}?</h1>
	<form method="post" action="?page=fontsampler&amp;subpage=fonts">
		<input type="hidden" name="action" value="delete_font">
		{{ wp_nonce_field( 'fontsampler-action-delete_font' )|raw }}
		<input type="hidden" name="id" value="{{ font.id }}">
		<p>Files in this Fontset:</p>
		<ul class="real-list">
			{% for format in formats %}
				{% if font[format] is not empty %}
					<li>
						{{ format }}: <code>{{ font[format] }}</code>
					</li>
				{% endif %}
			{% endfor %}
		</ul>
		<br>
		<label class="fontsampler-radio">
			<input type="radio" value="0" name="remove_files" checked>
			<span>Keep all associated files from the Wordpress Media Gallery</span>
		</label><br>
		<label class="fontsampler-radio">
			<input type="radio" value="1" name="remove_files">
			<span>Also remove all associated files from the Wordpress Media Gallery</span>
			<small>Make sure no other Fontsets are referencing the same files!</small>
		</label>

		{{ submit_button( 'Yes, delete Fontset', 'delete' ) }}
	</form>
	<p><a href="?page=fontsampler">Back without deleting.</a></p>
{% endif %}
{% endblock %}
