index.html 1.64 KB
Newer Older
David Haynes's avatar
David Haynes committed
1
<!-- include the base html template -->
2
{% extends 'layouts/base.html' %}
David Haynes's avatar
David Haynes committed
3 4

<!-- load django crispy forms' tags -->
5
{% load crispy_forms_tags %}
6

David Haynes's avatar
David Haynes committed
7
<!-- define the page title block -->
8
{% block title %}
David Haynes's avatar
David Haynes committed
9
SRCT Go &bull; A University Branded URL Shortener
10 11
{% endblock %}

David Haynes's avatar
David Haynes committed
12
<!-- define the content block for the page -->
13 14
{% block content %}

David Haynes's avatar
David Haynes committed
15
<!-- define the page header div -->
16 17 18
<div class="page-header" id="banner">
  <div class="row">
    <div class="col-md-12">
David Haynes's avatar
David Haynes committed
19 20 21 22 23 24 25
      <h1><strong>
        <span class="fa-stack fa-lg">
          <i class="fa fa-circle fa-stack-2x"></i>
          <i class="fa fa-link fa-stack-1x fa-inverse"></i>
        </span>
        <i class="fa">Shorten URL</i>
      </strong></h1>
26 27 28 29
    </div>
  </div>
</div>

David Haynes's avatar
David Haynes committed
30
<!-- call django crispy forms to render the go link creation form here -->
31
{% crispy form %}
32

David Haynes's avatar
David Haynes committed
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
<!-- 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>

62
{% endblock %}