Restore support for passing return_url

This commit is contained in:
Jeremy Stretch 2025-07-21 10:39:41 -04:00
parent 8793d42b7f
commit 6744a96652
6 changed files with 6 additions and 6 deletions

View File

@ -1,3 +1,3 @@
<button type="submit" name="_sync" {% formaction %}="{{ url }}" class="btn btn-primary">
<button type="submit" name="_sync" {% formaction %}="{{ url }}{% if return_url %}?return_url={{ return_url }}{% endif %}" class="btn btn-primary">
<i class="mdi mdi-sync" aria-hidden="true"></i> {{ label }}
</button>

View File

@ -1,3 +1,3 @@
<button type="submit" name="_disconnect" {% formaction %}="{{ url }}" class="btn btn-red">
<button type="submit" name="_disconnect" {% formaction %}="{{ url }}{% if return_url %}?return_url={{ return_url }}{% endif %}" class="btn btn-red">
<i class="mdi mdi-ethernet-cable-off" aria-hidden="true"></i> {{ label }}
</button>

View File

@ -35,7 +35,7 @@ Context:
</div>
<div class="d-print-none mt-2">
{% block bulk_controls %}
{% action_buttons actions model multi=True %}
{% action_buttons actions model multi=True return_url=request.path %}
{% block bulk_extra_controls %}{% endblock %}
{% endblock bulk_controls %}
</div>

View File

@ -1,3 +1,3 @@
<button type="submit" name="_delete" {% formaction %}="{{ url }}" class="btn btn-red">
<button type="submit" name="_delete" {% formaction %}="{{ url }}{% if return_url %}?return_url={{ return_url }}{% endif %}" class="btn btn-red">
<i class="mdi mdi-trash-can-outline" aria-hidden="true"></i> {{ label }}
</button>

View File

@ -1,3 +1,3 @@
<button type="submit" name="_edit" {% formaction %}="{{ url }}" class="btn btn-yellow">
<button type="submit" name="_edit" {% formaction %}="{{ url }}{% if return_url %}?return_url={{ return_url }}{% endif %}" class="btn btn-yellow">
<i class="mdi mdi-pencil" aria-hidden="true"></i> {{ label }}
</button>

View File

@ -1,5 +1,5 @@
{% if url %}
<button type="submit" name="_rename" {% formaction %}="{{ url }}" class="btn btn-yellow">
<button type="submit" name="_rename" {% formaction %}="{{ url }}{% if return_url %}?return_url={{ return_url }}{% endif %}" class="btn btn-yellow">
<i class="mdi mdi-pencil" aria-hidden="true"></i> {{ label }}
</button>
{% endif %}