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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user