Add date input to build target_date

This commit is contained in:
Oliver Walters 2020-12-16 16:13:38 +11:00
parent 17d23fa47c
commit 597bf8be73
2 changed files with 18 additions and 2 deletions

View File

@ -32,6 +32,12 @@ class EditBuildForm(HelperForm):
'reference': _('Build Order reference')
}
target_date = forms.DateField(
widget=forms.DateInput(
attrs={'type': 'date'}
)
)
class Meta:
model = Build
fields = [

View File

@ -37,7 +37,12 @@ src="{% static 'img/blank_image.png' %}"
<a href="{% url 'admin:build_build_change' build.pk %}"><span title="{% trans 'Admin view' %}" class='fas fa-user-shield'></span></a>
{% endif %}
</h3>
<h3>{% build_status_label build.status large=True %}</h3>
<h3>
{% build_status_label build.status large=True %}
{% if build.is_overdue %}
<span class='label label-large label-large-red'>{% trans "Overdue" %}</span>
{% endif %}
</h3>
<hr>
<p>{{ build.title }}</p>
<div class='btn-row'>
@ -81,7 +86,12 @@ src="{% static 'img/blank_image.png' %}"
<tr>
<td><span class='fas fa-info'></span></td>
<td>{% trans "Status" %}</td>
<td>{% build_status_label build.status %}</td>
<td>
{% build_status_label build.status %}
{% if build.is_overdue %}
<span title='{% trans "This build was due on "%} {{ build.target_date }}' class='label label-red'>{% trans "Overdue" %}</span>
{% endif %}
</td>
</tr>
<tr>
<td><span class='fas fa-spinner'></span></td>