new template _partials for apps.dashboard, incl. _form.html & _scripts.html; respective form, table & content code offloaded from base.html, home.html & list.html; functional_tests.test_my_list TODO resumed (only FT not currently passing, but this is as expected)

This commit is contained in:
Disco DeDisco
2026-02-08 21:43:58 -05:00
parent 8190317c21
commit 306b4c8e5e
6 changed files with 56 additions and 42 deletions

View File

@@ -62,33 +62,13 @@
<div class="row justify-content-center p-5 bg-body-tertiary rounded-3">
<div class="col-lg-6 text-center">
<h2 class="display-1 mb-4">{% block header_text %}{% endblock header_text %}</h2>
<form method="POST" action="{% block form_action %}{% endblock form_action %}">
{% csrf_token %}
<input
id="id_text"
name="text"
class="form-control form-control-lg{% if form.errors %} is-invalid{% endif %}"
placeholder="Enter a to-do item"
value="{{ form.text.value | default:'' }}"
aria-describedby="id_text_feedback"
required
/>
{% if form.errors %}
<div id="id_text_feedback" class="invalid-feedback">
{{ form.errors.text.0 }}
</div>
{% endif %}
</form>
{% block extra_header %}
{% endblock extra_header %}
</div>
</div>
<div class="row justify-content-center">
<div class="col-lg-6">
{% block table %}
{% endblock table %}
</div>
</div>
{% block content %}
{% endblock content %}
</div>
</body>
@@ -96,12 +76,7 @@
<script
src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.8/js/bootstrap.min.js"
></script>
<script src="/static/apps/scripts/dashboard.js"></script>
<script>
window.onload = () => {
initialize("#id_text");
};
</script>
{% block scripts %}
{% endblock scripts %}
</html>