emancipated hardcoded form views & html from base.html, apps.dashboard.views, apps.dashboard.tests.test_views; added get_item_input_box() helper method to functional_tests.base & retrofitted the other FTs to utilize it

This commit is contained in:
Disco DeDisco
2026-01-20 15:14:05 -05:00
parent 93cc6632c4
commit 1d96871d7b
7 changed files with 59 additions and 54 deletions

View File

@@ -18,19 +18,10 @@
<h2 class="display-2 mb-2">{% block header_text %}{% endblock header_text %}</h2>
<form method="POST" action="{% block form_action %}{% endblock form_action %}">
{% if form %}
{{ form.text }}
{% else %}
<input
class="form-control form-control-lg{% if error %} is-invalid{% endif %}"
name="text"
id="id-new-item"
placeholder="Enter a to-do item"
/>
{% endif %}
{{ form.text }}
{% csrf_token %}
{% if error %}
<div class="invalid-feedback">{{ error }}</div>
{% if form.errors %}
<div class="invalid-feedback">{{ form.errors.text }}</div>
{% endif %}
</form>
</div>