mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-05 17:28:31 +02:00
The purpose of this change is to allow direct use of Django templates to make edits to how form fields and labels are rendered, while retaining the validation logic provided by Django's extensive field and widget library. This commit additional contains: - Remove `REQUIRED_SUFFIX`, as it is handled by the templates now - Remove `required=True` from form fields, as this is the default - Remove `required=False` from fields where it was added as workaround for conditionally required questions which Django form wizard couldn't handle - Replace `clean_is_policy_acknowledged` with `error_messages` dict - Remove duplicate nil entry for Federal Agency dropdown - Update `DOMAIN_REGEX` to match whole string - Subtle changes to `is_valid` and `get_forms` in ApplicationWizard to reduce database calls and use form object's initial data correctly
8 lines
No EOL
336 B
HTML
8 lines
No EOL
336 B
HTML
<input
|
|
type="{{ widget.type }}"
|
|
name="{{ widget.name }}"
|
|
{# hint: spacing in the class string matters #}
|
|
class="{{ uswds_input_class }}{% if classes %} {{ classes }}{% endif %}"
|
|
{% if widget.value != None %}value="{{ widget.value|stringformat:'s' }}"{% endif %}
|
|
{% include "django/forms/widgets/attrs.html" %}
|
|
/> |