{% load staticfiles i18n %}

<div class="modal-dialog modal-lg">
	<div class="modal-content">
		<form id="item_update_form" method='post' class="form" role="form"
			action= "{% url 'dashboard:change_broadcast' schedule.id %}">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal"
					aria-hidden="true">×</button>
				<h4 class="modal-title" id="myModalLabel"> {{ schedule.programme }} - {{ schedule }}</h4>
			</div>
			<div class="modal-body">
				{% csrf_token %} {{ form.non_field_errors }}
				<div class="form-group">
					{% for field in form %}
					<div class="form-group">
						{% if field.errors %}
						<ul class="form-errors">
							{% for error in field.errors %}
							<li><span class="fa fa-exclamation-triangle"></span> <strong>
							{{ error|escape }}</strong></li> {% endfor %}
						</ul>
						{% endif %} {{ field.label_tag }} {{ field }} 
						{% if field.help_text %}
						<div class="form-helptext">{{ field.help_text }}</div>
						{% endif %}
					</div>
					{% endfor %}
				</div>
				<div class="modal-footer">
					<input type="button" class="btn btn-default" data-dismiss="modal"
						value="{% trans 'Close' %}" /> <input type="submit" class="btn btn-primary"
						value="{% trans 'Save changes' %}" />
				</div>
		</form>
		<script>
			var form_options = {
				target : '#modal',
				success : function() {
				}
			}
			$('#item_update_form').ajaxForm(form_options);
		</script>
	</div>
	<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
