Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
B
bmon
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
energy
bmon
Commits
4fb4b390
Commit
4fb4b390
authored
Mar 27, 2020
by
Alan Mitchell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made Lockdown form extend base.html instead of secure.html.
Also show or hide Logout button as appropriate.
parent
0545c6eb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
126 deletions
+20
-126
bmsapp/templates/bmsapp/base.html
bmsapp/templates/bmsapp/base.html
+6
-9
bmsapp/templates/bmsapp/secure.html
bmsapp/templates/bmsapp/secure.html
+0
-115
bmsapp/templates/lockdown/form.html
bmsapp/templates/lockdown/form.html
+10
-2
bmsapp/views.py
bmsapp/views.py
+4
-0
No files found.
bmsapp/templates/bmsapp/base.html
View file @
4fb4b390
...
@@ -123,16 +123,13 @@
...
@@ -123,16 +123,13 @@
<div
class=
"container mt-0 pt-3"
>
<div
class=
"container mt-0 pt-3"
>
<hr
/>
<hr
/>
<div
class=
"row"
>
{% if logout_show %}
<div
class=
"col"
>
<div
class=
"row"
>
<p></p>
<div
class=
"col"
>
</div>
<a
class=
"btn btn-primary btn-sm float-right"
href=
"/?preview-logout"
>
Logout
</a>
</div>
</div>
</div>
<div
class=
"col-rt"
>
{% endif %}
<div
id=
"lkd"
class=
"d-flex justify-content-end"
>
<a
class=
"btn btn-primary btn-sm"
href=
"/?preview-logout"
>
Logout
</a>
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-auto"
>
<div
class=
"col-auto"
>
<img
class=
"ml-3"
src=
"{% static 'bmsapp/images/ahfc_logo.png' %}"
width=
"75"
height=
"58"
<img
class=
"ml-3"
src=
"{% static 'bmsapp/images/ahfc_logo.png' %}"
width=
"75"
height=
"58"
...
...
bmsapp/templates/bmsapp/secure.html
deleted
100644 → 0
View file @
0545c6eb
{% 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
bmsapp/templates/lockdown/form.html
View file @
4fb4b390
{% extends "bmsapp/
secur
e.html" %}
{% extends "bmsapp/
bas
e.html" %}
{% block content %}
{% block content %}
<div
id=
"lockdown"
>
<div
id=
"lockdown"
>
...
@@ -14,4 +14,12 @@
...
@@ -14,4 +14,12 @@
{% endif %}
{% endif %}
</div>
</div>
{% endblock %}
{% endblock %}
\ No newline at end of file
{% block scripts %}
<script>
$
(
function
()
{
// Remove the Nav Bar from the page.
$
(
"
#nav_container
"
).
remove
();
});
</script>
{% endblock %}
bmsapp/views.py
View file @
4fb4b390
...
@@ -52,6 +52,10 @@ def base_context():
...
@@ -52,6 +52,10 @@ def base_context():
ctx
[
'orgs_html'
]
=
orgs_html
ctx
[
'orgs_html'
]
=
orgs_html
ctx
[
'orgs_hide'
]
=
orgs_hide
ctx
[
'orgs_hide'
]
=
orgs_hide
ctx
[
'bmsapp_nav_link_base_url'
]
=
reverse
(
'index'
)
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
return
ctx
def
index
(
request
):
def
index
(
request
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment