Commit Graph

255 Commits

Author SHA1 Message Date
Chris Hill-Scott
77aba35c49 Add an ‘add logo’ button
Because some people don’t know they can put their own logo on letters:

> The HM Government Logo is at the top of the letter and we can't see
> a way of putting the [organisation] logo on

> We are intending to use the letter template feature for the first time
> and wondered whether the branding is configurable or whether the HM
> Government header is the standard default.

> Can we replace HM Government logo with our own in the letter? IF yes,
> then how?

> I don't seem to be able to set the branding on the letters to be
> [organisation]. it's always HM government. Is there something that
> needs enabling for this account?

No-one actually wants the HM Government logo (no-one is sending real
letters using it). So we should leave the space blank and put a button
there prompting people to add their own logo.
2019-02-13 15:12:36 +00:00
Leo Hemsted
f83910599c remove option for branding to sometimes not show search
it wouldn't show search if there were under a certain amount of letter
or email branding options - however we know there will always be more
than that amount so lets remove some complexity.

Also, rename the SearchTemplatesForm because it can search anything -
it just prompts you to search by name is all.
2019-02-07 11:39:23 +00:00
Leo Hemsted
8266635a7a remove dvla_organisation and other unused things
dvla_organisation, branding_dict, a weird `branding` property on
update_service. all gone 💥
2019-02-07 11:38:20 +00:00
Leo Hemsted
a1caf77b0e use new letter branding instead of dvla organisation id
new code is copied stylistically from the email branding patterns.
Instead of `service.dvla_organisation`, there's now
`service.letter_branding` and `service.letter_branding_id`. However,
unlike email branding we're not currently showing a preview of the
logo. That can come later when we work out how we want to do it.
2019-02-07 11:30:18 +00:00
Leo Hemsted
0e20ca44a3 rename branding to email_branding
to help transition to having letter branding as well
2019-02-07 11:30:18 +00:00
Pea Tyczynska
fe6b73b8dc Remove service postage setting and choose_postage switch 2019-02-04 14:55:16 +00:00
Chris Hill-Scott
33f318afec Remove platform admin toggles for email/SMS
Users can do this themselves now.
2019-02-01 18:33:32 +00:00
Chris Hill-Scott
7905b29d64 Remove button to toggle folders on/off
We don’t need it now that everyone has folders.
2019-02-01 18:33:31 +00:00
Chris Hill-Scott
2fae31a1ee Use 301 to redirect old URL
301 is a `permanent redirect`, which is semantically more accurate.
2019-01-30 13:36:01 +00:00
Chris Hill-Scott
3b15b04fc2 Let users switch channels on and off by themselves
We let people do this for letters already. We should let them do it for
emails and texts too, rather than have to email us.
2019-01-29 16:05:32 +00:00
Katie Smith
0bf3a4b16d Refactor to add separate letter branding client
We were getting all letter logos from a method in the email branding
client. Since we will be adding more client methods to deal with
letters, it makes things clearer to separate the email and letter
branding clients.
2019-01-29 11:37:27 +00:00
Chris Hill-Scott
309de074c3 Don’t give postage choice on service and template
We are moving from the postage being set on the service to being set on
the template. Once a service has been migrated to have the new
permission they should no longer be able to set the postage at a service
level, only at the template level.
2019-01-15 12:06:56 +00:00
Pea Tyczynska
97058d3c5b Add service setting switch to choose postage per template 2018-12-27 18:05:30 +00:00
Chris Hill-Scott
5ec673b84d Merge pull request #2578 from alphagov/add-existing-live-to-go-live
Note existing live services in go live ticket
2018-12-13 10:43:57 +00:00
Chris Hill-Scott
b51410baba Merge pull request #2575 from alphagov/remove-commas-volumes
Strip commas from estimated volumes
2018-12-13 10:41:50 +00:00
Chris Hill-Scott
a8b916b57f Refactor gov user check into a decorator
We quite often use it in the same way as `@user_has_permissions`.
2018-12-12 13:42:26 +00:00
Chris Hill-Scott
9a70f6a7f4 Don’t let non-government users request to go live
Only users who work for government can accept the terms of use. This
will save us from having to email these requesters back telling them
they need to find someone else to submit the request.
2018-12-12 12:56:13 +00:00
Chris Hill-Scott
688bdd1d7a Note existing live services in go live ticket
It’s useful for analysing our growth to know if someone who’s requesting
to go live is already a live user of Notify.
2018-12-12 12:22:38 +00:00
Chris Hill-Scott
3cb0b164e8 Strip commas from estimated volumes
We suggest people format their numbers with commas when telling us how
many things they’re going to send.

This causes problems when we paste these values into a spreadsheet,
because the commas get interpreted as column separators.
2018-12-11 10:47:28 +00:00
Chris Hill-Scott
bc6b9c7af7 Use named arguments for clearer string formatting
Helps when the string is long.

Also helps disambiguate between the CDN domain used for the logos and
those for CSS/JS.
2018-11-29 11:56:01 +00:00
Chris Hill-Scott
84a3c80eb4 Launch first class postage feature
This commit makes it available to everyone. Available just means they
can select 1st class for all their letters, if they want it.
2018-11-26 15:53:14 +00:00
Pea Tyczynska
87c92e093b Update confirmation messages for delete sms-sender and delete reply-to-email 2018-11-16 17:05:59 +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
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
Chris Hill-Scott
10013a19aa Add live search to letter brandings
Matches what we do for email branding, makes the one you’re lookig for
quicker to find.
2018-11-06 13:08:58 +00:00
Chris Hill-Scott
684d4f7782 Refactor setting value on letter branding form
WTForms lets you pre-populate a form’s value by passing it in as an
argument to the constructor.

This will be good for us because it will let us access that value in
the constructor later on.
2018-11-06 13:00:30 +00:00
Chris Hill-Scott
48b0d4194e Use model to toggle research mode
Just a nice bit of encapsulation, rather than passing `current_service`
through to a method on `current_service`.
2018-11-05 17:15:52 +00:00
Chris Hill-Scott
318f846630 Move service permission handle inside the model
These helper functions for modifying a service permission were just
floating around loose in the view code.

A much better home for them is on the model. This will also make it
easy to reuse them in other views if we ever need to.
2018-11-05 17:15:52 +00:00
Chris Hill-Scott
a69551b2cb Use model to update service properties
We have a lot of places in settings where we update something by passing
in the `service_id`. `current_service` already knows about `service_id`,
so it’s cleaner to encapsulate these updates inside the model.
2018-11-05 17:15:52 +00:00
Chris Hill-Scott
67534f838d Don’t allow use of .get() on service model
Making people use a property is a sure way to make sure they’re spelling
the name of the property correctly, and allows us to easily swap out
properties that call through to the underlying JSON, and properties
which are implemented as methods.

The API should always return something in the JSON for a property, even
if it’s just `None`.
2018-10-30 15:09:54 +00:00
Chris Hill-Scott
1e2608d2e0 Refactor settings page to use service model
There’s a lot of code in service settings which:
- talks to the API directly through the clients
- passes that information through to the Jinja template

By encapsulating this logic in the service model:
- the Jinja template can access the data directly
- the logic can be reused across multiple methods
2018-10-30 15:07:52 +00:00
Chris Hill-Scott
e1197c54a5 Don’t allow indexing on service model
Making people use a property is a sure way to make sure they’re spelling
the name of the property correctly, and allows us to easily swap out
properties that call through to the underlying JSON, and properties
which are implemented as methods.
2018-10-30 14:55:01 +00:00
Katie Smith
ae79a3ac75 Add platform admin button for edit_folders permission
Added a platform admin button to allow / remove the edit_folders
permission for a service.
2018-10-25 12:09:26 +01:00
Chris Hill-Scott
5dd45da08c Add line about MOU to checklist
2/3 of our incomplete requests to go live are incomplete because the
Data Sharing and Financial Agreement isn’t signed.

We reckon we can be pushier about this by saying it’s ‘incomplete’ where
we know the agreement is signed.

Where the agreement is signed we should confirm this, rather than make
the line disappear. This is so it makes more sense to someone who sees
it as ‘incomplete’, signs it, then comes back to the page.

If we don’t know whether or not the agreement is signed we should wait
until someone has got in touch with us by requesting to go live to
figure it out. So that’s why we’re not showing that line at all.
2018-09-25 10:33:50 +01:00
Chris Hill-Scott
21d29a3090 Fix missing ‘complete’ tag in go live request
This tag was not showing up in the call to the Zendesk API because the
return value of a generator is not included as a member of that
generator (on things `yield`ed from it are).
2018-09-24 17:47:56 +01:00
Chris Hill-Scott
8bb23e09f2 Refactor to reduce nesting and repetition 2018-09-24 14:52:32 +01:00
Chris Hill-Scott
f29cfc0d48 Auto-tag email branding requests 2018-09-24 14:52:31 +01:00
Chris Hill-Scott
de65c30624 Tag request to go live tickets automatically
At the moment we manually tag tickets as they come in so we can analyse
how many of each type we’re getting.

Further, we manually tag all the request to go live tickets once a month
to analyse how many are complete/incomplete.

All this tagging is useful, but quite time consuming. Notify already
knows this information and – using the Zendesk API – we can tag them
automatically.

I’ve checked with Holly and this is the taxonomy we want to use.
2018-09-24 14:52:31 +01:00
Chris Hill-Scott
f29c6c90c0 Add info about checklist to ticket
So that someone picking up a ticket can be warned that they should be
checking these things.
2018-09-24 14:52:31 +01:00
Chris Hill-Scott
45b1b11abb Refactor go-live readyness into service model
All this info is info about the service. So it’s better to put it on
the service model because:
- encapsulation
- later reuse
2018-09-24 14:52:30 +01:00
Katie Smith
9660f372f3 Change naming in code to use 'postage'
Renamed everything that was previously called 'letter class' or 'postage
class' to 'postage', which is the new name we have decided to use.
2018-09-19 09:20:09 +01:00
Katie Smith
de9759b99a Add letter class row to settings page, visible to platform admin
Added a new row to the settings table, 'Post class', which shows the
default letter class of a service and is only visible to Platform Admin.

Also added a new page to enable Platform Admin users to change the
default letter class for a service - this only has two options at the
moment, 1st class only and 2nd class only.
2018-09-18 10:31:01 +01:00
Chris Hill-Scott
d80b735b2b Refactor some of the logic into form
It’s messy having a lot of logic in the view methods. Handling the form
stuff can be better encapsulated inside the `Form` subclass itself.
2018-09-05 10:25:39 +01:00
Chris Hill-Scott
80801d827a Put the currently selected branding top of list
There’s something that feels a bit off about not being able to see the
name of the currently-selected branding when you land on the page.

Putting it at the top also means that you can easily switch back to it
if you change your mind.
2018-09-05 10:07:36 +01:00
Chris Hill-Scott
f387f1e6ba Merge pull request #2268 from alphagov/request-to-go-live-better-data
Make the data we get from the go live requests more useful
2018-09-04 16:25:59 +01:00
Tom Byers
3655e63d34 Merge pull request #2262 from alphagov/remove_branding_type_from_set_email_branding_page
Remove branding type from set email branding page
2018-08-31 13:56:44 +01:00
Chris Hill-Scott
3c563ddca6 Use commas not tabs to delimit service info
Zendesk strips out the tabs. Commas are the next best thing because
Excel will automatically use them if you select ‘Split text into
columns’.
2018-08-30 15:31:46 +01:00
Chris Hill-Scott
86ad77e545 Add question about research consent
Since GDPR came into effect it’s less clear about whether we can
contact teams for user research purposes.

If we make people opt-in (or not) we know we’re safe to contact them (or
not).

Since we mostly care about how services are using Notify for real (ie
live services) or services that are considering adopting it (ie those
who have contacted us with a question) it feels like the go-live process
is the most appropriate place to collect this consent.
2018-08-30 15:31:46 +01:00
Chris Hill-Scott
12e0e12ced Replace channels and volumes with volumes/channel
Now that we’re a more mature platform we don’t care so much about the
load that one service might put on our platform.

We do care about intended volumes for two reasons:
- modelling the benefits that services get from using Notify
- managing stocks of envelopes (while our letter volumes are small
  enough that they could be skewed by one new service)

Changing to the ‘how many per year’ question also has the benefit of
mapping directly to the data we store in the ‘beta partners’
spreadsheet.
2018-08-30 15:31:46 +01:00
Chris Hill-Scott
80339046df Remove question about which features people use
This is an optional question. We don’t really use the answer to it now
that we have some adoption of all these features.
2018-08-30 15:31:45 +01:00