Commit 4fb4b390 authored by Alan Mitchell's avatar Alan Mitchell

Made Lockdown form extend base.html instead of secure.html.

Also show or hide Logout button as appropriate.
parent 0545c6eb
......@@ -123,16 +123,13 @@
<div class="container mt-0 pt-3">
<hr />
<div class="row">
<div class="col">
<p></p>
</div>
{% if logout_show %}
<div class="row">
<div class="col">
<a class="btn btn-primary btn-sm float-right" href="/?preview-logout">Logout</a>
</div>
</div>
<div class="col-rt">
<div id="lkd" class="d-flex justify-content-end">
<a class="btn btn-primary btn-sm" href="/?preview-logout">Logout</a>
</div>
</div>
{% endif %}
<div class="row">
<div class="col-auto">
<img class="ml-3" src="{% static 'bmsapp/images/ahfc_logo.png' %}" width="75" height="58"
......
{% load staticfiles %}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="{% static 'bmsapp/images/favicon.ico' %}">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<!-- Datepicker CSS-->
<link href="https://unpkg.com/gijgo@1.9.13/css/gijgo.min.css" rel="stylesheet" type="text/css" />
<!-- Multi-select control CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.9/dist/css/bootstrap-select.min.css">
<!-- This App's style sheets -->
<link rel="stylesheet" type="text/css" href="{% static 'bmsapp/css/bmsapp.css' %}?t={{ curtime }}">
<link rel="stylesheet" type="text/css" href="{% static 'bmsapp/css/dashboard.css' %}?t={{ curtime }}">
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script
src="https://code.jquery.com/jquery-3.4.0.min.js"
integrity="sha256-BJeo0qm959uMBGb65z40ejJYGSgR7REI4+CW1fNKwOg="
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"
integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"
integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"
crossorigin="anonymous"></script>
<!-- Date Picker-->
<script src="https://unpkg.com/gijgo@1.9.13/js/gijgo.min.js" type="text/javascript"></script>
<!-- Multi-Select -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.9/dist/js/bootstrap-select.min.js"></script>
<script>
/* Needed to tell selectpicker what version of Bootstrap is being used. */
$.fn.selectpicker.Constructor.BootstrapVersion = '4';
</script>
<!-- Plotly Charting Library -->
<script src="//cdn.plot.ly/plotly-latest.min.js"></script>
<!-- JS controlling Organization selector. -->
<script src="{% static 'bmsapp/scripts/base.js' %}?t={{ curtime }}"></script>
<script>
$(function() {
/* Tell select picker to use Mobile select interface, if mobile. */
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ) {
$('.selectpicker').selectpicker('mobile');
}
/* Makes active the nav link associated with the active page */
$("#{% block this_nav_link %}{% endblock %}").addClass("active");
});
</script>
{% block head %}{% endblock %}
<title>{{ bmsapp_title_text }} - {%block pagetitle %}{% endblock %}</title>
</head>
<body>
<span id="BaseURL" style="display:none">{{ bmsapp_nav_link_base_url }}</span>
<div id="main_header" class="jumbotron jumbotron-fluid py-2 mb-0 text-light">
<div class="container">
<h1 class="d-flex justify-content-center">
{{ bmsapp_header|safe }}
</h1>
</div>
</div>
<div class="container mt-0 pt-3">
<h2>{% block title %}{% endblock %}</h2>
{% block content %}{% endblock %}
</div>
<div class="container-fluid" mt=3>
{% block fullwidth %}{% endblock %}
</div>
<div class="container mt-0 pt-3">
<hr />
<div class="row">
<div class="col-auto">
<img class="ml-3" src="{% static 'bmsapp/images/ahfc_logo.png' %}" width="75" height="58"
border="0" alt="AHFC Logo" style="vertical-align:middle">
</div>
<div class="col">
<p>Thanks to the Alaska Housing Finance Corporation for funding development of most
of this application.</p>
</div>
</div>
<hr />
<div>
</div>
</div> <!-- End main container -->
{% block scripts %}{% endblock %}
</body>
</html>
\ No newline at end of file
{% extends "bmsapp/secure.html" %}
{% extends "bmsapp/base.html" %}
{% block content %}
<div id="lockdown">
......@@ -14,4 +14,12 @@
{% endif %}
</div>
{% endblock %}
\ No newline at end of file
{% endblock %}
{% block scripts %}
<script>
$(function() {
// Remove the Nav Bar from the page.
$("#nav_container").remove();
});
</script>
{% endblock %}
......@@ -52,6 +52,10 @@ def base_context():
ctx['orgs_html'] = orgs_html
ctx['orgs_hide'] = orgs_hide
ctx['bmsapp_nav_link_base_url'] = reverse('index')
# Only show Logout button if Django Lockdown app is being used.
ctx['logout_show'] = ('lockdown' in settings.INSTALLED_APPS)
return ctx
def index(request):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment