{% extends "base.html" %}

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

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

{% block content %}

	<form method="post">
		<fieldset>
			<legend>Update Supply Note</legend>
			{% if note.timestamp %}
				<label>Timestamp</label> {{ note.timestamp|hh_format }}
			{% endif %}
			<label>Body</label> {{input_textarea('body', note.body, 30, 80)}}
			<input type="submit" value="Update">
		</fieldset>
	</form>

	<form
	    hx-delete="/e/supplies/{{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 %}
