mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-21 12:38:26 +02:00
Render only useful content when displaying modals
This commit is contained in:
@ -259,7 +259,7 @@
|
||||
if (!modalBody.innerHTML.trim()) {
|
||||
if (url instanceof Function) url = url()
|
||||
|
||||
fetch(url)
|
||||
fetch(url, {headers: {'CONTENT-ONLY': '1'}})
|
||||
.then(resp => resp.text())
|
||||
.then(resp => new DOMParser().parseFromString(resp, 'text/html'))
|
||||
.then(res => modalBody.innerHTML = res.getElementById(content_id).outerHTML)
|
||||
|
1
tfjm/templates/empty.html
Normal file
1
tfjm/templates/empty.html
Normal file
@ -0,0 +1 @@
|
||||
{% block content %}{% endblock content %}
|
@ -1,4 +1,4 @@
|
||||
{% extends "base.html" %}
|
||||
{% extends request.content_only|yesno:"empty.html,base.html" %}
|
||||
{% comment %}
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
{% endcomment %}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% extends 'base.html' %}
|
||||
{% extends request.content_only|yesno:"empty.html,base.html" %}
|
||||
|
||||
{% load crispy_forms_filters highlight i18n search_results_tables django_tables2 %}
|
||||
|
||||
|
Reference in New Issue
Block a user