{% extends "base.html" %}
{% load crispy_forms_tags %}

{% block headtitle %}Add subtitle - {{PORTAL_NAME}}{% endblock headtitle %}

{% block innercontent %}
	<div class="user-action-form-wrap">
		<div class="user-action-form-inner">
			<h1>Add subtitle</h1>
			Media: <a href="{{media.get_absolute_url}}">{{media.title}}</a>

			<form enctype="multipart/form-data" action="" method="post" class="post-form">
				{% csrf_token %}
				{{ form|crispy }}
				<button class="primaryAction" type="submit">Add</button>
			</form>

			{% if subtitles %}
				<h3>View/Edit Existing Subtitles</h3>
				<ul>
					{% for subtitle in subtitles %}
						<li><a href="{{subtitle.url}}">{{subtitle.language.title}}</a></li>
					{% endfor %}
				</ul>
			{% endif %}

		</div>
	</div>
{% endblock innercontent %}
