Commit Graph

7627 Commits

Author SHA1 Message Date
Chris Hill-Scott
99ef4d61ff Update app/templates/views/pricing.html
Co-Authored-By: karlchillmaid <karl.chillmaid@digital.cabinet-office.gov.uk>
2019-04-16 14:44:02 +01:00
Chris Hill-Scott
78333b70b9 Update app/templates/views/pricing.html
Co-Authored-By: karlchillmaid <karl.chillmaid@digital.cabinet-office.gov.uk>
2019-04-16 14:43:53 +01:00
Chris Hill-Scott
232b8aa9c8 Update app/templates/views/pricing.html
Co-Authored-By: karlchillmaid <karl.chillmaid@digital.cabinet-office.gov.uk>
2019-04-16 14:43:43 +01:00
Chris Hill-Scott
163f8561e1 Update app/templates/views/message-status.html
Co-Authored-By: karlchillmaid <karl.chillmaid@digital.cabinet-office.gov.uk>
2019-04-16 14:43:34 +01:00
Chris Hill-Scott
534c5b1986 Update app/templates/views/features/letters.html
Co-Authored-By: karlchillmaid <karl.chillmaid@digital.cabinet-office.gov.uk>
2019-04-16 14:43:22 +01:00
Chris Hill-Scott
59e981030a Update app/templates/views/features/emails.html
Co-Authored-By: karlchillmaid <karl.chillmaid@digital.cabinet-office.gov.uk>
2019-04-16 14:43:10 +01:00
karlchillmaid
0ee322f137 Merge branch 'master' into features-content-updates 2019-04-16 13:50:50 +01:00
karlchillmaid
527d8ff10f Correct table 2019-04-16 13:49:46 +01:00
Tom Byers
d3cb5aa796 Merge pull request #2915 from alphagov/fix-functional-tests
Revert bump to library to unblock functional tests
2019-04-16 12:01:12 +01:00
Tom Byers
b4cc4c9bea Revert bump to library to unblock functional tests
Version 3.1.3 of govuk-elements-sass makes
everything with the `heading-small` class
`display: block`.

https://github.com/alphagov/govuk_elements/pull/552

We use that class in many places just to make the
text bold with the assumption that it the styles
it applies will not prevent our text rendering
inline. This change breaks that assumption.

We do need to swap these classes out for utility
classes that just apply the bold styles but it can
be done at a later date and we aren't missing out
on much by reverting this library.
2019-04-16 11:16:19 +01:00
karlchillmaid
521c7824d6 Update link 2019-04-16 10:25:33 +01:00
karlchillmaid
487919970b Update link 2019-04-16 10:25:02 +01:00
karlchillmaid
3f4ca1018d Updated link 2019-04-16 10:23:10 +01:00
karlchillmaid
d12c184d7e Update links 2019-04-16 10:21:01 +01:00
karlchillmaid
fe8e10a42a Update links
One left to do
2019-04-16 10:19:45 +01:00
karlchillmaid
6830a412de Update links 2019-04-16 10:18:33 +01:00
karlchillmaid
27d4b702cc Update links
One left to do
2019-04-16 10:16:19 +01:00
karlchillmaid
839fc99f30 Update links 2019-04-16 10:04:12 +01:00
Tom Byers
7a6579e8cb Merge pull request #2903 from alphagov/update-node-version
Update node version
2019-04-15 15:44:22 +01:00
karlchillmaid
230ba7bcb1 Update link 2019-04-15 15:28:37 +01:00
karlchillmaid
d97707652f Update links 2019-04-15 15:22:50 +01:00
Chris Hill-Scott
56d4d546f6 Merge pull request #2904 from alphagov/no-live-without-organisation
Don’t let services go live without an organisation
2019-04-15 13:26:15 +01:00
Chris Hill-Scott
8626777fde Don’t let services go live without an organisation
We shouldn’t be making services live without an agreement in place. In
order to have an agreement in place we need to know what organisation
operates the service.

If a service comes along but belongs to an organisation we don’t know
about then we should create that organisation. This commits removes the
link, which should force this to happen.
2019-04-12 22:42:23 +01:00
Chris Hill-Scott
e8b95f03c6 Merge pull request #2911 from alphagov/stop-posting-service-domain
Stop sending service domain to the API
2019-04-12 17:26:43 +01:00
Chris Hill-Scott
700e073d0f Stop sending service domain to the API
The API doesn’t look at it, and the rest of the admin code isn’t calling
the method with this argument any more.
2019-04-12 17:15:51 +01:00
Pea (Malgorzata Tyczynska)
5ac6255be7 Merge pull request #2897 from alphagov/overlay-for-failed-letters
Precompiled show preview with overlay when validation fails
2019-04-12 16:37:53 +01:00
Chris Hill-Scott
8084dce705 Merge pull request #2896 from alphagov/remove-domains-yml
Use organisations from database rather than YAML file
2019-04-12 16:37:15 +01:00
Tom Byers
a4bca73b80 Make Jenkins use Node 10 2019-04-12 15:36:57 +01:00
Tom Byers
4766390f17 Remove gulp-load-plugins
It's not being updated at the moment and has a few
vulnerabilities listed against its dependencies.
2019-04-12 15:36:57 +01:00
Tom Byers
a8a29698cb Replace gulp-base64 with gulp-base64-inline
The gulp-base64 package has 11 dependencies with
vulnerabilities listed against them as of this
time. It also doesn't seem to be maintained any
more. The last commit was in 2015 and there are
issues and pull requests up to bump the
dependencies.

This replaces it with gulp-base64-inline.

gulp-base64-inline takes a single path, which it
prepends to any image paths it finds. Our image
paths are actually URLs, not filesystem paths so
we need to send it a relative path to repoint the
URL.

This commit includes changes that remove a few
`@import`s from one of our sass partials.

They aren't needed as those files are imported
further up the stack and `_typography.scss` has an
import in it that overwrites the new
`_url-helpers.scss` we added here.
2019-04-12 15:36:57 +01:00
Tom Byers
fa851dcfec Bump remaining NPM packages used on client-side
Means that only the following packages will now be
out of date:

1. govuk_template_jinja
2. jquery

Reasons:

GOVUK Template Jinja

This bumps it to 0.24.1, after which the only
changes are to add analytics tracking to the
GOV.UK logo and cookie banner.

We don't need to track either of these and they
were added for GOVUK analytics work.

jQuery

jQuery stops supporting IE<9 after version
1.12. This is pretty much our support now but if
we move to IE>8 we shouldn't do it by bumping the
version. This would just increase the amount of
broken JS we ship to IE8.

Also: both are deprecated and we will move off
them in the near future.
2019-04-12 15:36:57 +01:00
Tom Byers
01b97986f6 Update diff-dom package to 3.1.0
Since it moved to ES Modules in version 2.3.1,
diff-dom stopped including the `diffDOM.js` file
in its NPM package.

We don't do any kind of bundling in our build yet,
just concatenation of our scripts and some
minification of the results so we can't take
advantage of this yet.

The `diffDOM.js` file is still available in the
Github release so this moves to referencing that
in the `package.json` instead, until we start
using a bundler.

I opened an issue to check this is what the author
intended:

https://github.com/fiduswriter/diffDOM/issues/84

The latest version also adds Rollup as a peer
dependency.
2019-04-12 15:36:57 +01:00
Tom Byers
05f3cb6797 Bump JSHint 2019-04-12 15:36:57 +01:00
Tom Byers
fed3381209 Bump Babel to 7.4.0
Requires replacing `babel-preset-es2015` for
`babel-preset-env` as Babel switched to this as of
version 6:

https://babeljs.io/docs/en/babel-preset-es2015

Note: this also moves all Babel packages to using
the scoped packages syntax, descended from the
`@babel` namespace.

https://docs.npmjs.com/about-scopes
2019-04-12 15:36:57 +01:00
Tom Byers
71463182f1 Stop using Babel to transpile gulpfile
Bumping NodeJS to 10.15.3 removes the need to
transpile `gulpfile.js` as this version includes
all the ES6 features used..

Also removes .babelrc file. This was included to
ensure the gulpfile was transpiled correctly so it
is no longer needed.
2019-04-12 15:36:57 +01:00
Tom Byers
b83053ddd1 Fix sass-lint
Sass-lint was bumped when gulp-sass-lint was
bumped. This brought in a new version which
changed the interface of `sassLint.format`.

It doesn't look like the `sassLint.format` method
ever defined any arguments or did anything with
the `arguments` variable. That being the case, our
sending it an instance of the 'stylish' ESLint
reporter did nothing in the previous version but
this wasn't obvious because sass-lint defaults to
'stylish' for its output styling.

The latest version (1.4.0) introduced an argument
of a writable stream which, if defined, will be
used to write the output to. This caused a problem
with our sending in the instance of 'stylish'.

This moves the selection of stylish into the
sass-lint config, as described in the
[sass-lint docs](https://github.com/sasstools/gulp-sass-lint/tree/master#sasslintformatwritable).
2019-04-12 15:36:57 +01:00
Tom Byers
c3a1e6ed59 Bump Gulp to 4.0.0
Brings in a new API which is a breaking change:

https://github.com/gulpjs/gulp/blob/master/CHANGELOG.md#400

Requires gulpfile.babel.js to be a CommonJS module
and for all tasks to be exported.

Replaces using ES6 modules for the CommonJS to
include other packages to match the type of module
the gulpfile now is.

Updates to 4.0.0 include `series` and `parallel`
methods which remove the need for the
`run-sequence` package.

Also bumps gulp-specific libraries.
2019-04-12 15:36:57 +01:00
Tom Byers
c7f3b688cd Bump version of NodeJS to 10.15.3
Updates the README to reference this.

If running this locally, it's recommended to use
the 'n' NPM package to manage your version of
NodeJS, as described in the README:

https://github.com/alphagov/notifications-admin#first-time-setup
2019-04-12 15:36:57 +01:00
Chris Hill-Scott
3212915a51 Simplifying code for checking email domains
Since this code isn’t trying to inherit from the code that also looked
up domain names in `domains.yml` it can go back to being a lot simpler.

This code is thoroughly tested already here:
a249382e69/tests/app/main/test_validators.py (L74-L155)
2019-04-12 15:23:08 +01:00
Chris Hill-Scott
07c7544049 Use crown not crown_status as prop name
It’s confusing having a property name which is different from the
attribute returned in the JSON from the API.
2019-04-12 15:23:08 +01:00
Chris Hill-Scott
5d091b214a Remove domains.yml file
Since we’ve now removed the code that reads this file, it can safely be
deleted.
2019-04-12 15:23:08 +01:00
Chris Hill-Scott
9d99c78c3a Remove code that reads domains.yml
Since we’ve removed calls to this code from the rest of the app, it can
safely be removed now.
2019-04-12 15:23:08 +01:00
Chris Hill-Scott
470b8a2912 Remove domains from branding forms
We’re deprecating storing the domain as text on a branding in favour of
a database relationship between branding and organisation.

We need to do this now in order to remove the validation on these fields
(which depends on the data in `domains.yml`)
2019-04-12 15:23:07 +01:00
Chris Hill-Scott
9684e962ae Refactor go live tags into service model
Since this function only takes one argument, a service, it might as well
be a method of the service.
2019-04-12 15:19:32 +01:00
Chris Hill-Scott
3565ffc33f Remove dependence on domains.yml from settings
Settings looked at `domains.yml` when users were making go live requests
or email branding requests.

This will allow us to remove the `domains.yml` file, by using
information about organisations that is now stored in the database
instead.
2019-04-12 15:19:31 +01:00
Chris Hill-Scott
b41c3779c4 Merge pull request #2906 from alphagov/auto-service-counts
Automate counting of live services and orgs
2019-04-12 14:15:41 +01:00
Chris Hill-Scott
835d11d8d6 Remove domains.yml dependence from agreement pages
This will allow us to remove the `domains.yml` file, by using
information about organisations that is now stored in the database
instead.
2019-04-12 14:12:10 +01:00
Chris Hill-Scott
98249158cb Stop trying to infer branding when adding services
The API handles this now.
2019-04-12 14:08:33 +01:00
Chris Hill-Scott
72f49a9a1e Remove dependence on domains.yml from static pages
This will allow us to remove the `domains.yml` file, by using
information about organisations that is now stored in the database
instead.
2019-04-12 14:05:00 +01:00
Chris Hill-Scott
718f440720 Get info about organisations from database table
This is the first step of replacing the `domains.yml` file.

In order to replicate the same functionality we get from the
`domains.yml` file and its associated code this commit adds a
`Organisation` model. This model copies a lot of methods from the
`AgreementInfo` class which wrapped the `domains.yml` file.

It factors out some stuff that would otherwise be duplicated between the
`Organisation` and `Service` model, in such a way that could be reused
for making other models in the future.

This commit doesn’t change other parts of the code to make use of this
new model yet – that will come in subsequent commits.
2019-04-12 14:01:14 +01:00