Improve style and responsiveness of event entry in taskDetail
This commit is contained in:
parent
7b0ea4cb62
commit
09bc22f60b
@ -1,5 +1,7 @@
|
|||||||
{% extends "base.djhtml" %}
|
{% extends "base.djhtml" %}
|
||||||
|
|
||||||
|
{% load widget_tweaks %}
|
||||||
|
|
||||||
{% block title %} {{ tool.name }} - {{ task.name }} | RecMaint {% endblock %}
|
{% block title %} {{ tool.name }} - {{ task.name }} | RecMaint {% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
@ -18,11 +20,32 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<form method="post">
|
{% if form.errors %}
|
||||||
{% csrf_token %}
|
<div class="alert alert-warning">
|
||||||
{{ form }}
|
<h3> Error: </h3>
|
||||||
<input type="submit" value="Submit">
|
{{ form.errors }}
|
||||||
</form>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="d-md-none">
|
||||||
|
<h2> Log a Maintenance Event </h2>
|
||||||
|
<form class="form-group" method="post">
|
||||||
|
{% csrf_token %}
|
||||||
|
<fieldset class="form-group">
|
||||||
|
{{ form.date.label_tag }}
|
||||||
|
{% render_field form.date type="date" class="form-control" %}
|
||||||
|
</fieldset>
|
||||||
|
<fieldset class="form-group">
|
||||||
|
{{ form.user.label_tag }}
|
||||||
|
{% render_field form.user class="form-control" %}
|
||||||
|
</fieldset>
|
||||||
|
<fieldset class="form-group">
|
||||||
|
{{ form.notes.label_tag }}
|
||||||
|
{% render_field form.notes class="form-control form-control-sm" rows="2" %}
|
||||||
|
</fieldset>
|
||||||
|
<input type="submit" class="btn btn-primary" value="Submit">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
<h2> Event Log </h2>
|
<h2> Event Log </h2>
|
||||||
<table class="table table-striped table-hover">
|
<table class="table table-striped table-hover">
|
||||||
@ -34,6 +57,15 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<tr class="d-none d-md-table-row">
|
||||||
|
<form method="post">
|
||||||
|
{% csrf_token %}
|
||||||
|
<td> {% render_field form.date type="date" class="form-control" %} </td>
|
||||||
|
<td> {% render_field form.user class="form-control" style="width: initial;" %} </td>
|
||||||
|
<td> {% render_field form.notes class="form-control form-control-sm" rows="2" %} </td>
|
||||||
|
<td> <input type="submit" class="btn btn-primary" value="Submit"> </td>
|
||||||
|
</form>
|
||||||
|
</tr>
|
||||||
{% for event in events|dictsortreversed:"date" %}
|
{% for event in events|dictsortreversed:"date" %}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="text-nowrap"> {{ event.date }} </td>
|
<td class="text-nowrap"> {{ event.date }} </td>
|
||||||
|
Loading…
Reference in New Issue
Block a user