Skip to content

Commit

Permalink
Merge pull request #100 from nhsuk/fix-code-smells
Browse files Browse the repository at this point in the history
Fix SonarCloud code smells
  • Loading branch information
the-nathan-smith authored Jan 8, 2024
2 parents 3ea156a + c0e638c commit 1907c26
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,12 @@ The latest javascript file can be found in github releases https://github.com/nh

#### Attributes

`data-form-endpoint` - (required) An HTTP data store endpoint to POST data to. Include the trailing slash
`data-form-endpoint` - (required) An HTTP data store endpoint to POST data to. Include the trailing slash. The endpoint setting should probably be this:

```html
<div id="nhsuk-user-feedback-form" data-form-endpoint="http://localhost:7071/"></div>
```

`data-enable-text-response` - (optional) Include to enable text responses on the feedback form.

## API
Expand Down
8 changes: 2 additions & 6 deletions tests/example/enabled-text-response.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
Expand All @@ -18,11 +19,6 @@
<main class="nhsuk-main-wrapper">
<h1>User feedback form:</h1>
<div id="nhsuk-user-feedback-form" data-form-endpoint="http://localhost:8080/my-endpoint/" data-enable-text-response></div>

<!--
If you have the user-feedback-store running locally and want to test it, the endpoint setting should probably be this:
<div id="nhsuk-user-feedback-form" data-form-endpoint="http://localhost:7071/"></div>
-->
</main>
</div>
</body>
Expand Down
8 changes: 2 additions & 6 deletions tests/example/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
Expand All @@ -18,11 +19,6 @@
<main class="nhsuk-main-wrapper">
<h1>User feedback form:</h1>
<div id="nhsuk-user-feedback-form" data-form-endpoint="http://localhost:8080/my-endpoint/"></div>

<!--
If you have the user-feedback-store running locally and want to test it, the endpoint setting should probably be this:
<div id="nhsuk-user-feedback-form" data-form-endpoint="http://localhost:7071/"></div>
-->
</main>
</div>
</body>
Expand Down

0 comments on commit 1907c26

Please sign in to comment.