captains-log/templates/partials/tasks/edit.html

22 lines
553 B
HTML

<form hx-target="this", hx-swap="outerHtml">
<div>
<label>Title</label>
<input type="text" name="title" value="{{ task.title }}"> </input>
</div>
<div>
<label>Description</label>
{% if let Some(desc) = task.description %}
<input type="text" name="description" value="{{ desc }}"> </input>
{% else %}
<input type="text" name="description" value=""> </input>
{% endif %}
</div>
<button hx-get="/tasks/{{ task.id }}">
Cancel
</button>
<button hx-put="/tasks/{{ task.id }}">
Submit
</button>
</form>