Continue implementing WhatsApp
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
{% load cache %}
|
||||
{% include 'mixins/partials/notify.html' %}
|
||||
{% cache 600 objects_signal_accounts request.user.id object_list type service %}
|
||||
<div id="{{ context_object_name|slugify }}-panel">
|
||||
{% if service_warning %}
|
||||
<article class="notification is-warning is-light" style="margin-bottom: 0.55rem;">
|
||||
{{ service_warning }}
|
||||
@@ -8,10 +7,10 @@
|
||||
{% endif %}
|
||||
<table
|
||||
class="table is-fullwidth is-hoverable"
|
||||
hx-target="#{{ context_object_name }}-table"
|
||||
id="{{ context_object_name }}-table"
|
||||
hx-target="#{{ context_object_name|slugify }}-panel"
|
||||
id="{{ context_object_name|slugify }}-table"
|
||||
hx-swap="outerHTML"
|
||||
hx-trigger="{{ context_object_name_singular }}Event from:body"
|
||||
hx-trigger="{{ context_object_name_singular|slugify }}-event from:body"
|
||||
hx-get="{{ list_url }}">
|
||||
<thead>
|
||||
<th>{{ service_label|default:"Service" }} account</th>
|
||||
@@ -24,12 +23,17 @@
|
||||
<div class="buttons">
|
||||
<button
|
||||
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
|
||||
hx-delete="{# url 'account_delete' type=type pk=item.id #}"
|
||||
hx-trigger="click"
|
||||
hx-target="#modals-here"
|
||||
hx-swap="innerHTML"
|
||||
hx-confirm="Are you sure you wish to unlink {{ item }}?"
|
||||
class="button">
|
||||
{% if account_unlink_url_name %}
|
||||
hx-delete="{% url account_unlink_url_name type=type account=item %}"
|
||||
hx-trigger="click"
|
||||
hx-target="#{{ context_object_name|slugify }}-panel"
|
||||
hx-swap="outerHTML"
|
||||
{% endif %}
|
||||
{% if account_unlink_url_name %}
|
||||
hx-confirm="Are you sure you wish to unlink {{ item }}?"
|
||||
{% endif %}
|
||||
class="button"
|
||||
{% if not account_unlink_url_name %}disabled{% endif %}>
|
||||
<span class="icon-text">
|
||||
<span class="icon">
|
||||
<i class="fa-solid fa-xmark"></i>
|
||||
@@ -94,8 +98,8 @@
|
||||
<form
|
||||
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
|
||||
hx-post="{% url account_add_url_name type=type %}"
|
||||
hx-target="#widgets-here"
|
||||
hx-swap="innerHTML">
|
||||
hx-target="{% if account_add_target %}{{ account_add_target }}{% else %}#widgets-here{% endif %}"
|
||||
hx-swap="{% if account_add_swap %}{{ account_add_swap }}{% else %}innerHTML{% endif %}">
|
||||
{% csrf_token %}
|
||||
<div class="field has-addons">
|
||||
<div id="device" class="control is-expanded has-icons-left">
|
||||
@@ -122,4 +126,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endcache %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user