Files
htmxtailwindtest/templates/feed_inline.html

29 lines
1.1 KiB
HTML

<tr id="feed_{{feed.id}}">
<td>
<label class="w-full">
<input type="text" class="input input-sm" name="name" form="update_feed_{{feed.id}}" value="{{feed.name}}"/>
</label>
</td>
<td>
<label class="w-full">
<input type="url" class="input input-sm" name="feed_url" form="update_feed_{{feed.id}}" value="{{feed.feed_url}}">
</label>
</td>
<td>{{feed.last_pub_date.clone().unwrap_or("None".to_string())}}</td>
<td>
<button class="btn btn-sm btn-warning"
hx-get="/feed/{{feed.id}}"
hx-target="#feed_{{feed.id}}"
hx-swap="outerHTML">
Cancel
</button>
<button class="btn btn-sm btn-primary" type="submit" form="update_feed_{{feed.id}}">
Confirm
<img id="update_feed_{{feed.id}}_indicator" class="htmx-inline htmx-indicator" src="/assets/oval.svg"
style="height: 1rem; margin-left: 2px" alt="...">
</button>
<form id="update_feed_{{feed.id}}" hx-put="/feed/{{feed.id}}" hx-target="#feed_{{feed.id}}" hx-swap="outerHTML"
hx-indicator="#update_feed_{{feed.id}}_indicator">
</form>
</td>
</tr>