Commit Graph

7170 Commits

Author SHA1 Message Date
Katie Smith
6f2c4601a8 Merge pull request #2451 from alphagov/csv-upload-sender-id
Store the sender_id that should be used for a job in S3 metadata
2018-11-12 13:42:13 +00:00
Katie Smith
0f90bde958 Store the sender_id that should be used for a job in S3 metadata
Currently, a user can select a reply-to email address or text message
sender when uploading a CSV file but this is ignored and the default is
always used instead. As a first step towards changing this, this adds
the sender_id (if selected) to the S3 metadata so that this information
can be used when processing the job.
2018-11-12 13:34:33 +00:00
Chris Hill-Scott
4c9f667de3 Sort folders alphabetically
To match the order in which templates are sorted.
2018-11-12 11:53:37 +00:00
Chris Hill-Scott
07dd59f5b6 Add folder icons to template list
To make it easier to identify what is a folder.
2018-11-12 11:53:37 +00:00
Chris Hill-Scott
fb339a08a8 Refactor CSS to better use inherited naming 2018-11-12 11:53:37 +00:00
Rebecca Law
8dc7e6e5f8 Merge pull request #2470 from alphagov/move-into-existing-folders
Let users move things into folders
2018-11-12 11:40:00 +00:00
Chris Hill-Scott
55fa85d79b Fix copypaste error 2018-11-12 09:54:25 +00:00
Chris Hill-Scott
3cac9ac5cc Rename method to be more explicit 2018-11-12 09:21:47 +00:00
Chris Hill-Scott
40f676d3ad Move labels of template types out of model
The model shouldn’t have to care about how things are labelled in the
UI, it should only care about the data.
2018-11-12 09:16:14 +00:00
Chris Hill-Scott
c18a38d4f1 Make handling of None values in forms clearer
If the browser posts the value of `<input value='None'>` to the server
it does so as a string.

We want to post a value of `None` (actually JSON `null`) to the API. To
do this we:
- set the value in the form class to `'None'` (ie a string)
- convert to `None` (as a type) afterwards

However seeing `x = 'None'` in code looks a bit like a mistake. So to
make sure it looks deliberate and clear what is happening this commit:
- makes a reusable constant for `'None'`
- adds a comment explaining why it’s a string
2018-11-12 09:04:39 +00:00
Chris Hill-Scott
74a4400bc7 Update URLs to match change in API 2018-11-12 08:37:46 +00:00
Chris Hill-Scott
9de4b4598f Don’t show move when there’s nothing to move 2018-11-12 08:37:46 +00:00
Chris Hill-Scott
38e8cca606 Show page if all you got is empty folders 2018-11-12 08:37:46 +00:00
Chris Hill-Scott
cdb5b47c4d Post to the API when moving folders and templates
This commit adds logic to:
- take the list of selected folders and templates
- split it into two lists (of folders and templates)
- `POST` that data to the API, to effect the movement of said folders
  and templates

I’ve tried to architect it in such a way that we can easily add more
template ‘operations’ in the future, as we add more forms to the choose
template page.
2018-11-12 08:37:46 +00:00
Chris Hill-Scott
980d66bdaa Add helper function for filtering templates by type
This code was making the view method more cluttered than it needed to
be. Moving it will help make space for the `post` request handling code.
2018-11-12 08:37:46 +00:00
Chris Hill-Scott
2743216519 Show form elements for templates and folders
This commit adds:
- checkboxes to let you select a template or folder
- radio buttons to let you select where to move those template(s) and/or
  folder(s) to

It only does the `get` part of this work; handling the `post` and
calling API will be done in a subsequent commit.
2018-11-12 08:37:46 +00:00
Chris Hill-Scott
921de47164 Refactor template navigation options into model
This has two advantages:
- less logic in the view
- lets us filer the available navigation by which channels (email, text
  letter) a service has available
2018-11-12 08:37:46 +00:00
Chris Hill-Scott
4df96f3682 Add model properties for template and folder IDs
We’re going to need a way to find out if, for a given ID:
1. its a template or a folder
2. if it belongs to a given service

To do 2., we can make a set of all the IDs, to see if a given ID is a
member of that set.

To do 1. we can make two sets, one for templates and one for folders.

The natural home for these sets is on the service model.
2018-11-12 08:37:46 +00:00
Chris Hill-Scott
d98ec79a9d Add more thorough tests for the template search
It would be quite easy to dissociate the search box from the things its
supposed to be searching.

This commit adds assertions to make sure that the things the search box
is targeting are on the page
2018-11-12 08:37:46 +00:00
Chris Hill-Scott
e4f8f4e98a Merge pull request #2379 from alphagov/add-folder-icons
Add folder icons
2018-11-09 15:05:28 +00:00
Rebecca Law
812a4f4ecc Merge pull request #2473 from alphagov/438-services
Service count to 438 and orgs to 132
2018-11-09 13:31:22 +00:00
Pete Herlihy
d9d9db2140 Service count to 438 and orgs to 132 2018-11-09 12:50:46 +00:00
Rebecca Law
73fce86b40 Merge pull request #2468 from alphagov/add-parent-folder-id-when-creating-template
Create a template in a folder.
2018-11-09 11:12:30 +00:00
Rebecca Law
9f4ef2e269 Remove service_once from method signature 2018-11-09 11:04:42 +00:00
Rebecca Law
a4d9dc4616 Added a test for create template with parent folder id 2018-11-09 10:47:21 +00:00
Tom Byers
c04c57b043 Fix linting errors 2018-11-08 22:47:52 +00:00
Tom Byers
412b1f1117 Add extra checks for resize and onload
Position of elements are normally checked when you
scroll but we also need it to check when the page
loads.

Re-calculate element positions if window resizes.

Adds a flag to mark if all elements have a height
which will not change as their contents have
loaded.
2018-11-08 22:45:24 +00:00
Tom Byers
fa1d669f4f Rename script to reflect what it now does 2018-11-08 22:39:39 +00:00
Tom Byers
fd7c03d224 Remove stop-at-footer JS
This functionality will be included in the
stick-to-top JS. Removing it here to start that
work with a blank slate.
2018-11-08 22:39:39 +00:00
Tom Byers
deaa253e65 Add stop-at-bottom functionality
Detach all methods from sticky reference so they
can be attached to different objects.

Split sticky into stickAtTop and stickAtBottom and
make new versions of all methods and properties
specific to stickAtBottom.

Add CSS for stickAtBottom and call on load
2018-11-08 22:39:38 +00:00
Rebecca Law
146c7915b2 Create a template in a folder. 2018-11-08 15:53:33 +00:00
karlchillmaid
30ed9cfaca Merge pull request #2467 from alphagov/data-protection-act-update
Updated data protection law description
2018-11-08 15:37:28 +00:00
Tom Byers
ef76d4eeb3 Record height of each sticky element
Function borrowed from stop-at-bottom JS.
2018-11-08 15:11:01 +00:00
Tom Byers
53d43073ef Refactor stick-at-top to remove top-specific code 2018-11-08 15:11:01 +00:00
Tom Byers
9e1ceb13ea Make local copy of stick-at-top JS 2018-11-08 15:11:01 +00:00
karlchillmaid
2fa87dd9b8 Updated Sending state description
Updated Sending state description to keep the style consistent with the other states in the list
2018-11-08 12:51:49 +00:00
Alexey Bezhan
622fdfedc9 Merge pull request #2452 from alphagov/create-template-folders
Create template folders
2018-11-08 11:58:39 +00:00
karlchillmaid
528a176651 Updated data protection law description
Original content: 'Notify complies with the Data Protection Act.'
This should be updated to take account of GDPR – for example, 'Notify complies with data protection law' (which covers both DPA and GDPR).
This change is consistent with the Service Manual.
2018-11-08 11:16:18 +00:00
Chris Hill-Scott
18277b9f15 Use CSS selector instead of page.find in template folders tests
Co-Authored-By: allait <al@fueledbylemons.com>
2018-11-08 11:09:00 +00:00
Chris Hill-Scott
3a6c6f2951 Anticipate agreement being signed 2018-11-08 09:30:52 +00:00
Chris Hill-Scott
13e41b7cbd Fix syntax error 2018-11-07 16:24:57 +00:00
Chris Hill-Scott
bcb5583c20 Confirm that PPF are crown
we‘ve sent them the crown MOU
2018-11-07 16:24:36 +00:00
Chris Hill-Scott
e74819eaf8 Merge pull request #2414 from alphagov/reduce-logging-during-tests
Reduce logging noise in traceback output
2018-11-07 16:21:18 +00:00
Chris Hill-Scott
d7cf28c07e Merge pull request #2464 from alphagov/ashfield.gov.uk
Mark agreement signed by Ashfield District Council
2018-11-07 15:53:53 +00:00
Chris Hill-Scott
345f3b2d68 Mark agreement signed by Ashfield District Council 2018-11-07 15:36:25 +00:00
Chris Hill-Scott
f90d6e68f1 Add Pension Protection Fund to domains list
Need to find out if:
- crown/non-crown
- agreement signed
2018-11-07 15:18:22 +00:00
Chris Hill-Scott
c0c0015dc4 Merge pull request #2448 from alphagov/alphabetical-sort-letter-brandings
Make letter brandings easier to find with sorting and filtering
2018-11-07 13:50:05 +00:00
fidejoseph
7aa8fcde95 Update using-notify.html
New description for the 'sending' status
2018-11-07 11:25:16 +00:00
Chris Hill-Scott
a02a8efca1 Merge pull request #2460 from alphagov/hex-error-message
Make hex colour code error more helpful
2018-11-07 11:18:08 +00:00
Chris Hill-Scott
666d55e82b Merge pull request #2428 from alphagov/api-key-page-neatness
Make API key page handle multiple lines of text better
2018-11-07 11:17:53 +00:00