{% extends "base.html" %}

{% block title %}
	&raquo; Supplier Contracts &raquo; {{ contract.name }} &raquo; Issues &raquo; Add
{% endblock %}

{% block nav %}
	<a href="/e/supplier_contracts">Supplier Contracts</a> &raquo; 
	<a href="/e/supplier_contracts/{{contract.id}}">{{contract.name}}</a> &raquo; 
	<a href="/e/supplier_contracts/{{contract.id}}/issues">Issues</a> &raquo; Add
{% endblock %}

{% block content %}

	<form action="/e/supplier_contracts/{{contract.id}}/add_issue" method="post">
		<fieldset>
			<legend>Add An Issue</legend>

			{% if supply %}
				{% set era = supply.eras[-1] %}
				<input type="hidden" name="supply_id" value="{{supply.id}}"/>
				<label>Supply</label>
			 	<a href="/e/supplies/{{supply.id}}">{{era.imp_mpan_core or ''}} {{era.exp_mpan_core or ''}}</a>
			{% endif %}
				
			<label>Subject</label>
			{{input_text('subject')}}

			<input type="submit" value="Add">
		</fieldset>
	</form>

{% endblock %}
