Make hooks/callbacks inherit type

This commit is contained in:
2022-10-16 14:14:53 +01:00
parent 3af63c5ef6
commit 97d12b0fab
14 changed files with 102 additions and 64 deletions

View File

@@ -0,0 +1,31 @@
{% include 'partials/notify.html' %}
{% load crispy_forms_tags %}
{% load crispy_forms_bulma_field %}
<form
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
{% if hook_id is not None %}
hx-put="{% url 'hook_action' hook_id %}"
{% else %}
hx-put="{% url 'hook_action' %}"
{% endif %}
hx-target="#hooks-table"
hx-swap="outerHTML">
{% csrf_token %}
{{ form|crispy }}
<button
type="button"
class="button is-light modal-close-button">
Cancel
</button>
<button type="submit" class="button is-info modal-close-button">Submit</button>
</form>

View File

@@ -1,7 +1,7 @@
<div class="buttons">
<button
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
hx-get="{% url 'hook_action' %}"
hx-get="{% url 'hook_action' type=type %}"
hx-trigger="click"
hx-target="#modals-here"
class="button is-info">

View File

@@ -37,7 +37,7 @@
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
hx-get="{% url 'hooks' type='window' %}"
hx-trigger="click"
hx-target="#items-here"
hx-target="#windows-here"
hx-swap="afterend"
class="button is-info">
<span class="icon-text">