{% extends 'template_content/template_content_base.html' %}
{% load i18n localcosmos_tags %}

{% block subcontent %}

	<div class="row justify-content-md-center">
		<div class="col-12 col-md-6 mt-3">

			{% if form.fields.template_name.choices %}
				<h4>{% blocktrans %}Add new {{ template_type }}{% endblocktrans %}</h4>
				<form action="{% if assignment %}{% url 'create_template_content' app.uid template_type assignment %}{% else %}{% url 'create_template_content' app.uid template_type %}{% endif %}" method="POST">{% csrf_token %}
					{% render_bootstrap_form form %}
					<p class="text-center">
						<button type="submit" class="btn btn-outline-primary">{% trans 'Add' %}</button>
					</p>
				</form>
			{% else %}
				<div class="alert alert-danger">{% blocktrans %}Your frontend does not supply any templates.{% endblocktrans %}</div>
			{% endif %}
		</div>
	</div>
	<hr>
	<!--
	<div class="row justify-content-md-center">
		<div class="col-12 text-left">
			<h4>{% trans 'Custom templates' %}</h4>
			<p>
				{% trans 'You can create and upload your own custom templates.' %}
			</p>
			<button type="button" class="btn btn-outline-primary xhr" data-url="{ url 'upload_custom_template' app.uid }" ajax-target="ModalContent">{% trans 'Upload custom template' %}</button>
		</div>
	</div>-->
{% endblock %}
