Format entry forms as tables.

Keeps everything aligned nicely.
This commit is contained in:
Chris GIACOFEI
2024-06-03 08:05:56 -04:00
parent 3adcc33310
commit 870925837a
3 changed files with 79 additions and 44 deletions

View File

@ -20,6 +20,8 @@
</div> <!-- /container --> </div> <!-- /container -->
<div class="container"> <div class="container">
<div class="row">
<div class="col-md-6 form-group">
<form action="{% url 'yeast:labels' batch.id %}" method="post"> <form action="{% url 'yeast:labels' batch.id %}" method="post">
<fieldset> <fieldset>
<legend>Batch Samples</legend> <legend>Batch Samples</legend>
@ -41,15 +43,18 @@
{% endfor %} {% endfor %}
</ul> </ul>
</fieldset> </fieldset>
<p><p> </div>
<div class="col-md-6 form-group">
<h1>Print Labels for this Batch</h1> <h1>Print Labels for this Batch</h1>
<p><p> <p><p>
<label for="skip_count">Number of labels already removed from the sheet: </label> <label for="skip_count">Number of labels already removed from the sheet: </label>
<input id="skip_count" type="number" name="skip_count" value=0 size="4"> <input id="skip_count" type="number" name="skip_count" value=0 size="4">
<p> <p>
<input type="submit" value="Print selected sample labels"> <input type="submit" value="Print selected sample labels">
</div>
</div>
</form> </form>
</div> <!-- /container --> </div> <!-- /container -->
</main> </main>
{% endblock %} {% endblock %}

View File

@ -1,23 +1,38 @@
<h1>Add New Batch</h1> {% extends 'base.html' %}
{% block style %}
form { display: table; }
p { display: table-row; }
label { display: table-cell; }
input { display: table-cell; }
{% endblock %}
<form action="" method="post">{% csrf_token %} {% block content %}
{{ form.as_p }} <div class="jumbotron">
<input type="submit" value="Submit" /> <div class="container">
</form> <h1 class="display-3">Add Batch</h1>
</div>
</div>
<div class="container">
<form action="" method="post">{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Submit" />
</form>
<!-- <form action="addbatch/" method="post"> <!-- <form action="addbatch/" method="post">
{% csrf_token %} {% csrf_token %}
production_date:<br> production_date:<br>
<input name="production_date"> <input name="production_date">
<br><br> <br><br>
strain:<br> strain:<br>
<input name="strain"> <input name="strain">
<br><br> <br><br>
source:<br> source:<br>
<input name="source"> <input name="source">
<br><br> <br><br>
data_web:<br> data_web:<br>
<input name="data_web"> <input name="data_web">
<br><br> <br><br>
<input type="submit" value="Submit"> <input type="submit" value="Submit">
</form> --> </form> -->
</div>
{% endblock %}

View File

@ -1,23 +1,38 @@
<h1>Add New Strain</h1> {% extends 'base.html' %}
{% block style %}
form { display: table; }
p { display: table-row; }
label { display: table-cell; }
input { display: table-cell; }
{% endblock %}
<form action="" method="post">{% csrf_token %} {% block content %}
{{ form.as_p }} <div class="jumbotron">
<input type="submit" value="Submit" /> <div class="container">
</form> <h1 class="display-3">Add Strain</h1>
</div>
</div>
<div class="container">
<form action="" method="post">{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Submit" />
</form>
<!-- <form action="addbatch/" method="post"> <!-- <form action="addbatch/" method="post">
{% csrf_token %} {% csrf_token %}
production_date:<br> production_date:<br>
<input name="production_date"> <input name="production_date">
<br><br> <br><br>
strain:<br> strain:<br>
<input name="strain"> <input name="strain">
<br><br> <br><br>
source:<br> source:<br>
<input name="source"> <input name="source">
<br><br> <br><br>
data_web:<br> data_web:<br>
<input name="data_web"> <input name="data_web">
<br><br> <br><br>
<input type="submit" value="Submit"> <input type="submit" value="Submit">
</form> --> </form> -->
</div>
{% endblock %}