{% extends "base.html" %}

{% block title %}
	Gas Contracts &raquo; {{g_contract.name}}
{% endblock %}

{% block nav %}
	<a href="/g/supplier_contracts">Gas Contracts</a> &raquo;
	<a href="/g/supplier_contracts/{{g_contract.id}}">{{g_contract.name}}</a> &raquo; Edit
{% endblock %}

{% block content %}

	<form action="/g/supplier_contracts/{{g_contract.id}}/edit" method="post">
		<fieldset>
			<legend>Update Contract</legend>
			<label>Name</label>
			{{input_text('name', g_contract.name)}}
			<label>Charge script</label>
			{{input_textarea('charge_script', g_contract.charge_script, 40, 80)}}
			<label>Properties</label>
			{{input_textarea('properties', g_contract.properties, 20, 80)}}
			<input type="submit" name="update" value="Update">
		</fieldset>
	</form>

	<h3>Example Properties</h3>

	<pre>{
"default_bill_parser": "csv",
}</pre>

	<form hx-delete="/g/supplier_contracts/{{g_contract.id}}/edit"
		hx-confirm="Are you sure you want to delete this supplier contract?">
		<fieldset>
			<legend>Delete this contract</legend>
			<input type="submit" value="Delete">
		</fieldset>
	</form>
{% endblock %}
