Template source: create.djt.html

{% extends "base.djt.html" %} {% block title %}Event Form{% endblock %} {% block metadata %} <meta charset="utf-8"> <meta name="description" content="Show a form for adding one record"> <!-- other html tags here --> {% endblock %} {% block content %} <script type="application/javascript"> $(window).bind("pageshow", function(event) { if (event.originalEvent.persisted) { window.location.reload(); } }); </script> <style> table, th, tr, td { border: none; margin: 5px 0; border-collapse: collapse; padding: 10px } .btn-space { margin-right: 12px; } </style> <h2>Add a new event</h2> <table> <tr> <td> <form action="create" method="POST"> <!-- This is when we request "create" as Post, which forces the POST code path.--> {% csrf_token %} <!--These are bootstrap buttons --> <!--<button type="submit" class ="btn btn-primary btn-med" >Save </button> <input type="button" value="Quit" onclick="history.back()" class="btn btn-secondary btn-med active" role="button" aria-pressed="true"> --> <button type="submit" class="btn btn-primary btn-space"> <i class="fas fa-save"></i> Save </button> <button type="button" class="btn btn-secondary" onclick="window.history.back()"> <i class="fas fa-times-circle"></i> Cancel </button> </td> </tr> {{ forminstance }} <tr> <td> <button type="submit" class="btn btn-primary btn-space"> <i class="fas fa-save"></i> Save </button> <button type="button" class="btn btn-secondary" value="Quit" onclick="history.back()"> <i class="fas fa-times-circle"></i> Cancel </button> </form> </td> </tr> </table> {% endblock content %}