Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-shaw committed Dec 4, 2024
1 parent b03630f commit 45dd23b
Show file tree
Hide file tree
Showing 14 changed files with 64 additions and 63 deletions.
24 changes: 13 additions & 11 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

title: ""
labels: ""
assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

title: ""
labels: ""
assignees: ""
---

**Is your feature request related to a problem? Please describe.**
Expand Down
26 changes: 13 additions & 13 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Expand Down
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,23 +132,23 @@ Finally, in your template set the page title appropriately if there are any form

The available widgets and their corresponding Flask-WTF field types are as follows:

| WTForms Field | GOV.​UK Widget(s) | Notes |
| --------------------------------------------------------------------------------------------------------- | ------------------------------ | ----- |
| [BooleanField](https://wtforms.readthedocs.io/en/3.1.x/fields/#wtforms.fields.BooleanField) | GovCheckboxInput | |
| [DateField](https://wtforms.readthedocs.io/en/3.1.x/fields/#wtforms.fields.DateField) | GovDateInput | |
| [DateTimeField](https://wtforms.readthedocs.io/en/3.1.x/fields/#wtforms.fields.DateTimeField) | GovDateInput | |
| [DecimalField](https://wtforms.readthedocs.io/en/3.1.x/fields/#wtforms.fields.DecimalField) | GovTextInput | |
| [FileField](https://wtforms.readthedocs.io/en/3.1.x/fields/#wtforms.fields.FileField) | GovFileInput | |
| WTForms Field | GOV.​UK Widget(s) | Notes |
| --------------------------------------------------------------------------------------------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
| [BooleanField](https://wtforms.readthedocs.io/en/3.1.x/fields/#wtforms.fields.BooleanField) | GovCheckboxInput | |
| [DateField](https://wtforms.readthedocs.io/en/3.1.x/fields/#wtforms.fields.DateField) | GovDateInput | |
| [DateTimeField](https://wtforms.readthedocs.io/en/3.1.x/fields/#wtforms.fields.DateTimeField) | GovDateInput | |
| [DecimalField](https://wtforms.readthedocs.io/en/3.1.x/fields/#wtforms.fields.DecimalField) | GovTextInput | |
| [FileField](https://wtforms.readthedocs.io/en/3.1.x/fields/#wtforms.fields.FileField) | GovFileInput | |
| [MultipleFileField](https://wtforms.readthedocs.io/en/3.1.x/fields/#wtforms.fields.MultipleFileField) | GovFileInput(multiple=True) | Note that you need to specify `multiple=True` when invoking the widget in your form class. _Not_ when you render it in the Jinja template. |
| [FloatField](https://wtforms.readthedocs.io/en/3.1.x/fields/#wtforms.fields.FloatField) | GovTextInput | |
| [IntegerField](https://wtforms.readthedocs.io/en/3.1.x/fields/#wtforms.fields.IntegerField) | GovTextInput | Use `params` to specify a `type` if you need to use HTML5 number elements. This will not happen automatically. |
| [PasswordField](https://wtforms.readthedocs.io/en/3.1.x/fields/#wtforms.fields.PasswordField) | GovPasswordInput | |
| [RadioField](https://wtforms.readthedocs.io/en/3.1.x/fields/#wtforms.fields.RadioField) | GovRadioInput | |
| [SelectField](https://wtforms.readthedocs.io/en/3.1.x/fields/#wtforms.fields.SelectField) | GovSelect | |
| [SelectMultipleField](https://wtforms.readthedocs.io/en/3.1.x/fields/#wtforms.fields.SelectMultipleField) | GovCheckboxesInput | Note that this renders checkboxes as `<select multiple>` elements are frowned upon. |
| [SubmitField](https://wtforms.readthedocs.io/en/3.1.x/fields/#wtforms.fields.SubmitField) | GovSubmitInput | |
| [StringField](https://wtforms.readthedocs.io/en/3.1.x/fields/#wtforms.fields.StringField) | GovTextInput | |
| [TextAreaField](https://wtforms.readthedocs.io/en/3.1.x/fields/#wtforms.fields.TextAreaField) | GovTextArea, GovCharacterCount | |
| [FloatField](https://wtforms.readthedocs.io/en/3.1.x/fields/#wtforms.fields.FloatField) | GovTextInput | |
| [IntegerField](https://wtforms.readthedocs.io/en/3.1.x/fields/#wtforms.fields.IntegerField) | GovTextInput | Use `params` to specify a `type` if you need to use HTML5 number elements. This will not happen automatically. |
| [PasswordField](https://wtforms.readthedocs.io/en/3.1.x/fields/#wtforms.fields.PasswordField) | GovPasswordInput | |
| [RadioField](https://wtforms.readthedocs.io/en/3.1.x/fields/#wtforms.fields.RadioField) | GovRadioInput | |
| [SelectField](https://wtforms.readthedocs.io/en/3.1.x/fields/#wtforms.fields.SelectField) | GovSelect | |
| [SelectMultipleField](https://wtforms.readthedocs.io/en/3.1.x/fields/#wtforms.fields.SelectMultipleField) | GovCheckboxesInput | Note that this renders checkboxes as `<select multiple>` elements are frowned upon. |
| [SubmitField](https://wtforms.readthedocs.io/en/3.1.x/fields/#wtforms.fields.SubmitField) | GovSubmitInput | |
| [StringField](https://wtforms.readthedocs.io/en/3.1.x/fields/#wtforms.fields.StringField) | GovTextInput | |
| [TextAreaField](https://wtforms.readthedocs.io/en/3.1.x/fields/#wtforms.fields.TextAreaField) | GovTextArea, GovCharacterCount | |

In order to generate things like email fields using `GovTextInput` you will need to pass additional params through when rendering it as follows:

Expand Down
4 changes: 2 additions & 2 deletions govuk_frontend_wtf/templates/button.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{% from 'govuk_frontend_jinja/components/button/macro.html' import govukButton %}
{{ govukButton(params) }}
{% from 'govuk_frontend_jinja/components/button/macro.html' import govukButton
%} {{ govukButton(params) }}
4 changes: 2 additions & 2 deletions govuk_frontend_wtf/templates/charactercount.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{% from 'govuk_frontend_jinja/components/character-count/macro.html' import govukCharacterCount %}
{{ govukCharacterCount(params) }}
{% from 'govuk_frontend_jinja/components/character-count/macro.html' import
govukCharacterCount %} {{ govukCharacterCount(params) }}
4 changes: 2 additions & 2 deletions govuk_frontend_wtf/templates/checkboxes.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{% from 'govuk_frontend_jinja/components/checkboxes/macro.html' import govukCheckboxes %}
{{ govukCheckboxes(params) }}
{% from 'govuk_frontend_jinja/components/checkboxes/macro.html' import
govukCheckboxes %} {{ govukCheckboxes(params) }}
4 changes: 2 additions & 2 deletions govuk_frontend_wtf/templates/date.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{% from 'govuk_frontend_jinja/components/date-input/macro.html' import govukDateInput %}
{{ govukDateInput(params) }}
{% from 'govuk_frontend_jinja/components/date-input/macro.html' import
govukDateInput %} {{ govukDateInput(params) }}
4 changes: 2 additions & 2 deletions govuk_frontend_wtf/templates/file-upload.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{% from 'govuk_frontend_jinja/components/file-upload/macro.html' import govukFileUpload %}
{{ govukFileUpload(params) }}
{% from 'govuk_frontend_jinja/components/file-upload/macro.html' import
govukFileUpload %} {{ govukFileUpload(params) }}
2 changes: 1 addition & 1 deletion govuk_frontend_wtf/templates/input.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{% from 'govuk_frontend_jinja/components/input/macro.html' import govukInput %}
{{ govukInput(params) }}
{{ govukInput(params) }}
4 changes: 2 additions & 2 deletions govuk_frontend_wtf/templates/password.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{% from 'govuk_frontend_jinja/components/password-input/macro.html' import govukPasswordInput %}
{{ govukPasswordInput(params) }}
{% from 'govuk_frontend_jinja/components/password-input/macro.html' import
govukPasswordInput %} {{ govukPasswordInput(params) }}
4 changes: 2 additions & 2 deletions govuk_frontend_wtf/templates/radios.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{% from 'govuk_frontend_jinja/components/radios/macro.html' import govukRadios %}
{{ govukRadios(params) }}
{% from 'govuk_frontend_jinja/components/radios/macro.html' import govukRadios
%} {{ govukRadios(params) }}
4 changes: 2 additions & 2 deletions govuk_frontend_wtf/templates/select.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{% from 'govuk_frontend_jinja/components/select/macro.html' import govukSelect %}
{{ govukSelect(params) }}
{% from 'govuk_frontend_jinja/components/select/macro.html' import govukSelect
%} {{ govukSelect(params) }}
4 changes: 2 additions & 2 deletions govuk_frontend_wtf/templates/textarea.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{% from 'govuk_frontend_jinja/components/textarea/macro.html' import govukTextarea %}
{{ govukTextarea(params) }}
{% from 'govuk_frontend_jinja/components/textarea/macro.html' import
govukTextarea %} {{ govukTextarea(params) }}

0 comments on commit 45dd23b

Please sign in to comment.