{% extends 'layout.twig' %}

{% block content %}
<h1>{% if font.id is not empty %} Edit this font set {% else %} Upload new font files {% endif %}</h1>

<form method="post" enctype="multipart/form-data" action="?page=fontsampler&amp;subpage=fonts" id="fontsampler-fontset-from" class="fontsampler-validate">
	<input type="hidden" name="action" value="edit_font">
	{{ wp_nonce_field( 'fontsampler-action-edit_font' )|raw }}
	<input type="hidden" name="id" value="{% if font.id is empty %}0{% else %}{{ font.id }}{% endif %}">

	<h2>Font name</h2>
	<p>This is the font name shown in any dropdowns or font name elements (e.g. "MyFont Regular Italic")</p>

	{{  include('fontset-fonts.twig', { font: font }) }}

	<p>The supplied files will be used to render the actual font sampler. Note that you don't have to
		provide all formats. Supplying at the very least the <code>woff</code> formats will
		cover a good amount of browsers. <a href="http://caniuse.com/#search=woff">See here for details.</a></p>

	<p><small>Note that these fonts are used for preview purposes only - what fonts you make available to customers
		is naturally independent from these files.</small></p>

	<p><small>Note further more that these files will be stored in your Wordpress Uploads folder. Once uploaded,
		you can re-use the same files also for defining other font sets and reuse them in any number of font sets and
		font samplers.</small></p>
	{% if font.id is empty %}
		{{ submit_button('Upload') }}
	{% else %}
		{{ submit_button('Update') }}
	{% endif %}
</form>

{% endblock %}
