{% extends "base.html" %}

{% block title %}
	Gas Supplies &raquo; {{g_supply.id}} &raquo; Notes &raquo; {{note.index}} Edit
{% endblock %}

{% block nav %}
	<a href="/g/supplies">Gas Supplies</a>  &raquo;
	<a href="/g/supplies/{{g_supply.id}}">{{g_supply.id}}</a>  &raquo;
	<a href="/g/supplies/{{g_supply.id}}/notes">Notes</a>  &raquo; {{note.index}} Edit
{% endblock %}

{% block content %}
	<form method="post" action="/g/supplies/{{g_supply.id}}/notes/{{note.index}}/edit">
		<fieldset>
			<legend>Update Supply Note</legend>
			{% if note.timestamp %}
				<label>Timestamp</label> {{ note.timestamp|date_format }}
			{% endif %}
			<label>Body</label> {{input_textarea('body', note.body, 30, 80)}}
			<input type="submit" value="Update">
		</fieldset>
	</form>

	<form
	    hx-delete="/g/supplies/{{g_supply.id}}/notes/{{note.index}}/edit"
			hx-confirm="Are you sure you want to delete this note?"
	>
		<fieldset>
			<legend>Delete Supply Note</legend>
			<input type="submit" value="Delete">
		</fieldset>
	</form>
{% endblock %}
