mirror of
https://github.com/Southampton-RSG/breccia-mapper.git
synced 2026-03-03 03:17:07 +00:00
fix: Don't insert form CSS/JS when no form
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
{% load bootstrap4 %}
|
||||
{% if 'use_i18n'|bootstrap_setting %}
|
||||
{% load i18n %}
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
{% load i18n %}
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
{% endif %}
|
||||
<html lang="{{ LANGUAGE_CODE|default:'en_us' }}">
|
||||
|
||||
@@ -25,8 +25,7 @@
|
||||
crossorigin="anonymous" />
|
||||
|
||||
{% load staticfiles %}
|
||||
<link rel="stylesheet"
|
||||
href="{% static 'css/global.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'css/global.css' %}">
|
||||
|
||||
{% if 'javascript_in_head'|bootstrap_setting %}
|
||||
{% if 'include_jquery'|bootstrap_setting %}
|
||||
@@ -38,14 +37,16 @@
|
||||
{% bootstrap_javascript %}
|
||||
{% endif %}
|
||||
|
||||
{% if form %}
|
||||
{{ form.media.css }}
|
||||
{% endif %}
|
||||
|
||||
{% block extra_head %}{% endblock %}
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="content" style="display: flex; flex-direction: column">
|
||||
<div class="content" style="display: flex; flex-direction: column">
|
||||
{% block navbar %}
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||
<div class="container">
|
||||
@@ -138,7 +139,8 @@
|
||||
{% if request.user.is_authenticated and not request.user.has_person %}
|
||||
<div class="alert alert-info rounded-0" role="alert">
|
||||
<p class="text-center mb-0">
|
||||
Your profile is currently blank. Please fill in your details so you can be part of the network.
|
||||
Your profile is currently blank.
|
||||
Please fill in your details so you can be part of the network.
|
||||
|
||||
<a class="btn btn-success"
|
||||
href="{% url 'people:person.create' %}?user">Profile</a>
|
||||
@@ -158,15 +160,15 @@
|
||||
<div class="container">
|
||||
{% block after_content %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="footer bg-light">
|
||||
<footer class="footer bg-light">
|
||||
<div class="container">
|
||||
<span class="text-muted">{{ settings.PROJECT_LONG_NAME }}</span>
|
||||
</div>
|
||||
</footer>
|
||||
</footer>
|
||||
|
||||
{% if not 'javascript_in_head'|bootstrap_setting %}
|
||||
{% if not 'javascript_in_head'|bootstrap_setting %}
|
||||
{% if 'include_jquery'|bootstrap_setting %}
|
||||
{# jQuery JavaScript if it is in body #}
|
||||
{% bootstrap_jquery jquery='include_jquery'|bootstrap_setting %}
|
||||
@@ -174,11 +176,13 @@
|
||||
|
||||
{# Bootstrap JavaScript if it is in body #}
|
||||
{% bootstrap_javascript %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{{ form.media.js }}
|
||||
{% if form %}
|
||||
{{ form.media.js }}
|
||||
{% endif %}
|
||||
|
||||
{% block extra_script %}{% endblock %}
|
||||
{% block extra_script %}{% endblock %}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user