Groundwork stuff for common competencies + other fixes

This commit is contained in:
2021-08-21 00:09:00 +01:00
parent 4fb0529cc0
commit 732af53fda
6 changed files with 33 additions and 41 deletions

View File

@@ -21,9 +21,6 @@
{% endblock %}
{% block content %}
{% if form.errors %}
{% include 'form_errors.html' %}
{% endif %}
<form role="form" action="{{ form.action|default:request.path }}" method="POST" id="add_record_form">
{% include 'form_errors.html' %}
{% csrf_token %}
@@ -44,9 +41,10 @@
</div>
<div class="form-group form-row">
<label for="date" class="col-sm-2 col-form-label">Training Date</label>
<div class="col-sm-10">
<div class="col-sm-8">
{% render_field form.date|add_class:'form-control'|attr:'type="date"' value=form.date.initial %}
</div>
<button class="btn btn-info col-sm-2" onclick="var date = new Date(); $('#id_date').val([date.getFullYear(), ('0' + (date.getMonth()+1)).slice(-2), ('0' + date.getDate()).slice(-2)].join('-'))" tabindex="-1" type="button">Today</button>
</div>
<div class="form-group form-row">
<label for="item_description" class="col-sm-2 col-form-label">Notes</label>