Commit 46c89973 authored by David Haynes's avatar David Haynes

Add comments to the index file

 - fairly simple again, though there's some inline js that needs to be
   moved out
parent 32731a37
Pipeline #477 passed with stage
in 7 minutes and 10 seconds
<!-- include the base html template -->
{% extends 'layouts/base.html' %}
<!-- load django crispy forms' tags -->
{% load crispy_forms_tags %}
<!-- define the page title block -->
{% block title %}
SRCT Go &bull; A University Branded URL Shortener
{% endblock %}
<!-- define the content block for the page -->
{% block content %}
<script type="text/javascript">
$(function() {
$("div_id_expires_custom").hide();
if ($("#id_expires_5").is(":checked")) {
$("#div_id_expires_custom").slideDown();
} else {
$("#div_id_expires_custom").slideUp();
}
$("#div_id_expires").click(function() {
if ($("#id_expires_5").is(":checked")) {
$("#div_id_expires_custom").slideDown();
} else {
$("#div_id_expires_custom").slideUp();
}
})
})
</script>
<!-- define the page header div -->
<div class="page-header" id="banner">
<div class="row">
<div class="col-md-12">
......@@ -38,6 +27,36 @@ $(function() {
</div>
</div>
<!-- call django crispy forms to render the go link creation form here -->
{% crispy form %}
<!-- load some JS to hide/show the custom date field -->
<script type="text/javascript">
$(function() {
// hide by default
$("div_id_expires_custom").hide();
// if the expires_custom checkbox is checked..
if ($("#id_expires_5").is(":checked")) {
// display the field
$("#div_id_expires_custom").slideDown();
} else {
// keep it up
$("#div_id_expires_custom").slideUp();
}
// if the expires_custom checkbox is clicked..
$("#div_id_expires").click(function() {
// if the expires_custom checkbox is checked..
if ($("#id_expires_5").is(":checked")) {
// display the field
$("#div_id_expires_custom").slideDown();
} else {
// keep it hidden
$("#div_id_expires_custom").slideUp();
}
})
})
</script>
{% endblock %}
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