Update CreateServiceForm with new fields

Changes its StringField to GovukTextInputField.

Includes changes to templates that use this form
and associated tests.
This commit is contained in:
Tom Byers
2020-08-07 12:18:29 +01:00
parent 9457ba206a
commit 949aa3a9bd
4 changed files with 9 additions and 12 deletions

View File

@@ -1131,7 +1131,7 @@ class OrganisationDomainsForm(StripWhitespaceForm):
class CreateServiceForm(StripWhitespaceForm):
name = StringField(
name = GovukTextInputField(
"Whats your service called?",
validators=[
DataRequired(message='Cannot be empty'),

View File

@@ -26,7 +26,7 @@
{% call form_wrapper() %}
{{ textbox(form.name, hint="You can change this later") }}
{{ form.name(param_extensions={"hint": {"text": "You can change this later"}}) }}
{{ page_footer('Add service') }}

View File

@@ -1,6 +1,5 @@
{% extends "withoutnav_template.html" %}
{% from "components/radios.html" import radios %}
{% from "components/textbox.html" import textbox %}
{% from "components/page-header.html" import page_header %}
{% from "components/page-footer.html" import page_footer %}
{% from "components/form.html" import form_wrapper %}
@@ -18,7 +17,7 @@
{% call form_wrapper() %}
{{ textbox(form.name, hint="You can change this later") }}
{{ form.name(param_extensions={"hint": {"text": "You can change this later"}}) }}
{% if not default_organisation_type %}
{{ radios(form.organisation_type) }}