{% extends "corporate_memberships/base.html" %}
{% load corporate_memberships_tags %}
{% load i18n %}

{% block title %}Corporate Membership Edit{% endblock %}

{% 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/corporate_memberships.css">
{% endblock %}

{% block body %}
<div class="t">
{% corpmemb_nav request.user corporate_membership %} 
     <h1>{% trans "Edit Corporate Membership" %}</h1>
     
    <form method="post" enctype="multipart/form-data">{% csrf_token %}
	<div class="forms">
	{% if form.errors.values %}
		<div class="errors">
		{% trans "There were some problems in the form. Please review. Thanks!" %}
		
		{% for field in form %}
			{% if field.errors %}
		          {% for error in field.errors %}
		          	<p><a href="{{ request.get_full_path }}#{{ field.auto_id }}">{{ field.label }} - {{ error }}</a></p>
		          {% endfor %}
			{% endif %}
		{% endfor %}
		
		</div>
	{% endif %}

		{% for field_obj in field_objs %}
				
			{% render_corp_field request field_obj form %}
			
		{% endfor %}
		
		<input type="submit" value="Submit" />
	</div>
	
	</form>
  
    
</div>
{% endblock %}

{% 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 %}
