{% extends "discounts/base.html" %}
{% load discount_tags %}
{% load perm_tags %}
{% load styled_forms %}
{% load i18n %}

{% block title %}{{ block.super }} {% trans "Edit" %}{% endblock title %}

{% block extra_head %}
{{ block.super }}
<link rel="stylesheet" href="{{ STATIC_URL }}css/jquery-ui/jquery-ui-1.8.2.custom.css">
<link rel="stylesheet" href="{{ STATIC_URL }}css/timepicker.css" />
<link rel="stylesheet" href="{{ STATIC_URL }}css/discounts.css">
{% endblock %}

{% block body %}

<div class="t">
    {% discount_nav request.user %}
	
    <h1>{% firstof MODULE_DISCOUNTS_LABEL "Discount" %} {% trans "Edit" %}</h1>
    
    <div class="discount-wrap">
    	<form action="{% url discount.edit discount.id %}" method="post">{% csrf_token %}
    	<div class="forms">
			{{ form|styled_form }}
        	<input type="submit" value="{% trans 'Update Discount' %}" />
		</div>
        </form>
    </div>

</div>
{% endblock body %}

{% block extra_body %}
    {{ block.super }}
	<script type="text/javascript" src="{{ STATIC_URL }}js/jquery-ui-1.8.2.custom.min.js"></script>
	<script src="{{ STATIC_URL }}js/jquery.time.picker.js" type="text/javascript"></script>
	<script type="text/javascript">
		$(".datepicker").datepicker({ dateFormat: 'yy-mm-dd' });
		$('.timepicker').timePicker({
		  show24Hours: false,
		  step: 15
		});
	</script>
{% endblock %}
