{% extends "base.html" %}
{% load i18n %}
{% load title_lang %}

{% block content %}

<h2><a href="{% url 'oppia_recent_activity' course.id %}">{{ course.title|title_lang:LANGUAGE_CODE }}</a> > {% trans 'Schedule' %}</h2>

<form action="." method="post" id="scheduleform">

{% csrf_token %}

<div class="fieldWrapper">
	<div class="fieldErrorWrapper">{{ form.title.errors }}</div>
	<div class="fieldLabelWrapper"><strong>{% trans 'form_field_schedule_title' %}</strong></div>
	<div class="fieldInputWrapper">{{ form.title }}</div>
</div>
<div class="fieldWrapper">
	<div class="fieldErrorWrapper">{{ form.default.errors }}</div>
	<div class="fieldLabelWrapper"><strong>{% trans 'form_field_schedule_default' %}</strong></div>
	<div class="fieldInputWrapper">{{ form.default }}</div>
</div>
			
{{ formset.management_form }}
{% for form in formset.forms %}
	<div class="fieldWrapper">
		<div class="fieldInputWrapper"><strong>{{ form.section.value|title_lang:LANGUAGE_CODE }}: {{ form.title.value|title_lang:LANGUAGE_CODE }}</strong></div>
	</div>
	{% if form.non_field_errors %}
		<div class="fieldWrapper">
			<div class="fieldErrorWrapper">{{ form.non_field_errors }}</div>
		</div>
	{% endif %}
	<div class="fieldWrapper">
		<div class="fieldErrorWrapper">{{ form.start_date.errors }}</div>
		<div class="fieldLabelWrapper">{% trans 'form_field_activityschedule_start_date' %}</div>
		<div class="fieldInputWrapper">{{ form.start_date }}</div>
	</div>
	<div class="fieldWrapper">
		<div class="fieldErrorWrapper">{{ form.end_date.errors }}</div>
		<div class="fieldLabelWrapper">{% trans 'form_field_activityschedule_end_date' %}</div>
		<div class="fieldInputWrapper">{{ form.end_date }}</div>
	</div>

	{{ form.digest }}
	{{ form.title }}
	{{ form.section }}
{% endfor %}
<div class="fieldWrapper">
    <div class="fieldLabelWrapper">&nbsp;</div>
    <div class="fieldInputWrapper"><input type="submit" value="{% trans 'button_schedule_save' %}" /></div>
</div>
</form>

{% endblock %}