{{define "recipe-edit"}}
<!DOCTYPE html>
<html>
	{{ template "head" }}
	<header>
		{{ template "nav" }}
		<h1>Recipe editor</h1>
	</header>
	<body>
		<main>
			<form action="/recipe/{{.Id}}">
				<input type="hidden" name="id" value="{{.Id}}">

				<p>
					<label>Title</label>
					<input type="text" name="title" value="{{.Title}}">
				</p>

				<p>
					<label>Portions</label>
					<input type="number" name="portions" value="{{.Portions}}">
				</p>

				<p>
					<label>URL</label>
					<input type="text" name="url" value="{{.Url}}">
				</p>

				<p>
					<label>Notes</label>
					<textarea name="notes" rows="4" cols="50">{{.Notes}}</textarea>
				</p>

				<button type="submit">save</button>
				<button onclick="window.location.href='/recipe/{{.Id}}';">cancel</button>
			</form>
		</main>
		{{ template "footer" }}
		<script src="/static/view/static/ceres.js"></script>
	</body>
</html>
{{end}}