Don't wrap buttons in network management

This commit is contained in:
Mark Veidemanis 2022-08-11 23:36:29 +01:00
parent 540120faf1
commit 3c199abc17
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 39 additions and 33 deletions

View File

@ -55,39 +55,45 @@
</td> </td>
<td> <td>
<div class="buttons"> <div class="buttons">
{% if relay.enabled %} <div class="nowrap-parent">
<button <div class="nowrap-child">
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}' {% if relay.enabled %}
hx-get="{% url 'threshold_irc_network_relay_status' relay|index:'net' relay|index:'id' 0 %}" <button
hx-target="#relays" hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
hx-swap="outerHTML" hx-get="{% url 'threshold_irc_network_relay_status' relay|index:'net' relay|index:'id' 0 %}"
class="button is-danger is-small"> hx-target="#relays"
<span class="icon" data-tooltip="Disable"> hx-swap="outerHTML"
<i class="fa-solid fa-wifi-slash" aria-hidden="true"></i> class="button is-danger is-small">
</span> <span class="icon" data-tooltip="Disable">
</button> <i class="fa-solid fa-wifi-slash" aria-hidden="true"></i>
{% else %} </span>
<button </button>
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}' {% else %}
hx-get="{% url 'threshold_irc_network_relay_status' relay|index:'net' relay|index:'id' 1 %}" <button
hx-target="#relays" hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
hx-swap="outerHTML" hx-get="{% url 'threshold_irc_network_relay_status' relay|index:'net' relay|index:'id' 1 %}"
class="button is-success is-small"> hx-target="#relays"
<span class="icon" data-tooltip="Enable"> hx-swap="outerHTML"
<i class="fa-solid fa-wifi" aria-hidden="true"></i> class="button is-success is-small">
</span> <span class="icon" data-tooltip="Enable">
</button> <i class="fa-solid fa-wifi" aria-hidden="true"></i>
{% endif %} </span>
<button </button>
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}' {% endif %}
hx-delete="{% url 'threshold_irc_network_relay_del' relay|index:'net' relay|index:'id' %}" </div>
hx-target="#relays" <div class="nowrap-child">
hx-swap="outerHTML" <button
class="button is-danger is-small"> hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
<span class="icon" data-tooltip="Delete"> hx-delete="{% url 'threshold_irc_network_relay_del' relay|index:'net' relay|index:'id' %}"
<i class="fa-solid fa-xmark" aria-hidden="true"></i> hx-target="#relays"
</span> hx-swap="outerHTML"
</button> class="button is-danger is-small">
<span class="icon" data-tooltip="Delete">
<i class="fa-solid fa-xmark" aria-hidden="true"></i>
</span>
</button>
</div>
</div>
</div> </div>
</td> </td>
</tr> </tr>