Commit Graph

5627 Commits

Author SHA1 Message Date
Chris Hill-Scott
c9a32c7327 Remove duplication of org type lookup
There’s a couple of places where we’re looking up the label for the type
of organisation.

Having this repeated in multiple places means it’s more likely we forget
to update one of these places when making a change.

This commit looks up from the tuple in the organisation model, which is
where other code references this stuff from. This is only possible now
that we don’t have duplicate keys (ie GP practice doesn’t share a key
any more).
2019-08-28 15:36:09 +01:00
Chris Hill-Scott
38c2b32fa8 Add ‘GP’ as an organisation type
Although their allowances are the same as what we call `nhs_local` it
makes more sense to store them separately because:

- we already present them as two separate choices to the user
- we may want to handle them differently in the future, eg in terms of
  what branding choices are available to them

Once the API is updated we can start passing in this new value from
the admin app.
2019-08-28 15:36:09 +01:00
Chris Hill-Scott
efabf0e87d Refactor to avoid redefinition of org types
We’re defining the list of org types in a few different places. This
makes it more likely we’ll forget to update one of these places, thereby
introducing a bug.

This commit moves the definition to be on the organisation model, which
feels like a sensible enough place for it.
2019-08-28 15:36:08 +01:00
karlchillmaid
4c232a9cab Fix h2 tag so heading displays properly 2019-08-23 14:16:23 +01:00
karlchillmaid
0d7005094a Merge pull request #3099 from alphagov/update-receive-text-message-content
Update explanation of inbound SMS
2019-08-23 14:13:54 +01:00
Tom Byers
823c5a6119 Add clearEvents method & refactor setEvents
`clearEvents` helps write the tests and also gives
users the opportunity to remove all of this
functionality.

Refactor of `setEvents` tidies up use of `self`.
2019-08-22 15:16:45 +01:00
karlchillmaid
165054866c Add sender name option to 'if' content 2019-08-22 13:55:29 +01:00
karlchillmaid
3f73106b31 Change 'users' to 'they' to reduce repetition 2019-08-22 10:52:26 +01:00
karlchillmaid
2967d7c54e Add code for current sender field 2019-08-22 10:50:04 +01:00
karlchillmaid
2ed988274f Add sender name placeholder 2019-08-22 09:34:47 +01:00
karlchillmaid
1f93b37d5c Update explanation of inbound SMS 2019-08-21 16:55:42 +01:00
karlchillmaid
983a1dc931 Merge pull request #3096 from alphagov/documentation-content-update
Update Documentation content
2019-08-21 14:33:37 +01:00
karlchillmaid
23f2ae1b3a Fix apostrophes 2019-08-21 11:10:23 +01:00
karlchillmaid
d4834c988d Fix apostrophes 2019-08-21 11:08:00 +01:00
karlchillmaid
8989f5a93b Update 'client libraries' 2019-08-21 10:17:36 +01:00
karlchillmaid
c05969e230 Update app/templates/views/documentation.html
Co-Authored-By: Chris Hill-Scott <me@quis.cc>
2019-08-21 10:15:27 +01:00
karlchillmaid
ff663ed172 Update app/templates/views/documentation.html
Co-Authored-By: Chris Hill-Scott <me@quis.cc>
2019-08-21 10:15:17 +01:00
karlchillmaid
6c9f6463c3 Update app/templates/views/documentation.html
Co-Authored-By: Chris Hill-Scott <me@quis.cc>
2019-08-21 10:15:10 +01:00
karlchillmaid
af7222de1d Update app/templates/views/documentation.html
Co-Authored-By: Chris Hill-Scott <me@quis.cc>
2019-08-21 10:15:03 +01:00
karlchillmaid
12f0c1e0ff Update timings and direct integration content 2019-08-21 09:56:27 +01:00
karlchillmaid
3dfa6e06cc Update client documentation content 2019-08-20 17:06:01 +01:00
karlchillmaid
73415f7a08 Update Integrating directly with the API content
Move the line about reading client documentation.
2019-08-20 15:07:48 +01:00
karlchillmaid
39461b369d Add details about timings and direct integration
Outline how long it can take to integrate using the client documentation.

Add more detail about how to integrate directly with the API.
2019-08-20 14:51:54 +01:00
karlchillmaid
98f51d8174 Update content 2019-08-20 12:03:42 +01:00
karlchillmaid
016f8f46ec Update receive text messages content
Update receive text messages content for clarity
2019-08-19 15:56:53 +01:00
Pea (Malgorzata Tyczynska)
551c4abee2 Merge pull request #3089 from alphagov/search-services-by-name
Find services by name or partial name
2019-08-16 11:53:07 +01:00
Pea Tyczynska
3844d050ff Simplify find users by email view - valdiation already done by form 2019-08-16 11:20:36 +01:00
karlchillmaid
2707e5192e Amend content for clarity 2019-08-15 15:13:39 +01:00
karlchillmaid
b0c6b7c2d4 Update roadmap 2019-08-15 13:13:11 +01:00
Pea Tyczynska
a906552c25 Require data on search by name form
This lets us build leaner views when using this form.
2019-08-15 12:41:51 +01:00
Pea Tyczynska
035cb19568 Find services by name or partial name 2019-08-14 11:38:58 +01:00
karlchillmaid
1e248d9205 Merge pull request #3083 from alphagov/text-message-pricing-update
Update Pricing information
2019-08-13 09:49:09 +01:00
Pea Tyczynska
862df6d359 WIP find services by name 2019-08-12 18:02:27 +01:00
karlchillmaid
4eeb71c432 Add brackets for VAT 2019-08-09 13:15:14 +01:00
karlchillmaid
23273e1b25 Update and move price increase information 2019-08-09 13:13:21 +01:00
karlchillmaid
2eb5e2ad50 Update content
Update introduction, text messages and letters
2019-08-09 11:53:12 +01:00
Katie Smith
8a453890e6 Add 'Uploads' hub and navigation
The uploads hub is just a page with text for now - there are no actions
available on the page. It is linked to from a new 'Uploads' menu item on
the left of the page which is only visible if your service has the
`letter` and `upload_letters` permissions and if the current user has
permissions to send messages.
2019-08-09 08:50:48 +01:00
karlchillmaid
00562cd0e7 Amend link 2019-08-08 12:28:10 +01:00
karlchillmaid
16b20475b2 Amend link 2019-08-08 12:27:48 +01:00
karlchillmaid
04880e8372 Update Slack link to use unique ID 2019-08-08 12:24:10 +01:00
karlchillmaid
1f67126ea5 Update Slack channel link to use unique ID 2019-08-08 12:23:04 +01:00
Tom Byers
6bf4e30a37 Merge pull request #3047 from alphagov/add-js-tests-for-radio-select
Add js tests for radio select
2019-08-07 15:16:24 +01:00
Andy Paine
f08ae7a77c Merge pull request #3075 from alphagov/use-paas-statsd
REP-340: Use PaaS hosted stats exporter
2019-08-07 10:56:20 +01:00
Tom Byers
551f7b91f4 Test and then fix focus when module state changes
Includes tests for this.
2019-08-07 10:23:09 +01:00
Tom Byers
c11c054323 Fix option selection for keyboard users
Keyboard users select a time slot by moving to the
radio for that slot, using the arrow keys, and
selecting it by pressing 'space' or 'enter', like
a `<select>`.

We allow this by listening for 'keydown' events
from the 'enter' or 'space' keys on time slot
radios that are checked.

Browsers fire 'click' events alongside the
'keydown' event meaning it's possible for the
code that makes the selection to be run twice.

We currently guard against this by checking for
the `pageX` property of the event object,
reasoning that a click event fired by a key press
won't have a cursor position.

Most browsers we support set it to `0` but it
isn't always the case:

https://dom-event-test.glitch.me/results.html

For those browsers, the `!event.pageX` condition
resolves correctly so this works. Safari and
versions of Internet Explorer before 11 however,
set it to a positive number.

In those browsers, moving the selection between
radios using the arrow keys fired a 'click' event
which, in Safari and IE<11, was treated as a
mouse/touch event and so confirmed the selection.
This made it impossible to select a later time.

These changes replace the 'click' event on time
slots with an artifical one that tracks
mouse/trackpad clicks by listening for a
'mousedown' followed by a 'mouseup' on a time
slot. This doesn't fire on key presses so avoids
the problem.
2019-08-07 10:23:09 +01:00
Tom Byers
64c6d1fbc7 Make clicking 'Done' preserve any selection made
Clicking the 'Done' button resets the module to
its default state. 'Done' implies you've
completed your selection so this doesn't make
sense.

This changes it so any selection made will be
confirmed when 'Done' is clicked.
2019-08-07 10:23:09 +01:00
Tom Byers
a2ec376d03 Make Hogan definition clearer in radioSelect JS
It helps the tests to know the `Hogan` variable is
actually a property of the global variable
(`window` in this case) and doesn't hurt the
readability of the script.
2019-08-07 10:23:09 +01:00
Rebecca Law
026a01a090 Changing the labels on the sevice setting page.
We added `Upload letters` to the platform admin service settings, which makes is confusing when next to `Upload documents`.
Also `User auth type editting` is a confusing label

`User auth type editting` --> `Email authentication`
`Uploading documents` --> `Send file by email`
2019-08-06 16:57:40 +01:00
Katie Smith
0882c76476 Add upload letters permission to service settings page
The upload_letters permission can only be changed by Platform Admin
users. It works in a similar way to the inbound_sms nested permission
- you only see the row in the table if you have the 'letter' permission,
but the 'letter' and 'upload_letters' are still separate permissions and
changing one does not affect the other.
2019-08-05 13:51:31 +01:00
Andy Paine
5242f67d97 REP-340: Use PaaS hosted stats exporter
- We are running the statsd exporter on PaaS now and we can route to it
  on apps.internal
- Send metrics there instead so they end up in Prometheus
2019-08-05 13:47:53 +01:00