{% extends "base.html" %}

{% block title %}
	&raquo; Supplier Contracts &raquo; Add
{% endblock %}

{% block nav %}
	<a href="/e/supplier_contracts">Supplier Contracts</a> &raquo; Add
{% endblock %}

{% block content %}
	<form action="/e/supplier_contracts/add" method="post">
		<fieldset>
			<legend>Add a contract</legend>	
			<label>Supplier</label>
			<select name="participant_id">
				{% for party in parties %}
					{{input_option(
						'participant_id', party.participant.id,
					 	party.participant.code + ' ' + party.name)}}
				{% endfor %}
			</select>
			<label>Name</label> {{input_text('name')}}
			<label>Start Date</label> {{input_date('start')}}
			<label>Charge script</label> {{input_textarea('charge_script', '', 40, 80)}}
			<label>Properties</label> {{input_textarea('properties', '{}', 20, 80)}}
			<input type="submit" value="Add">
		</fieldset>	
	</form>
{% endblock %}
