Commit graph

11247 commits

Author SHA1 Message Date
Paul Chavard
4c0f9a4d61 update serializers specs to use revisions 2020-09-02 11:26:26 +02:00
Paul Chavard
d1e0b65658 update jobs specs to use revisions 2020-09-02 11:26:26 +02:00
Paul Chavard
6a33a8e48b update controllers specs to use revisions 2020-09-02 11:26:26 +02:00
Paul Chavard
dee12a2b0b update features specs to use revisions 2020-09-02 11:26:26 +02:00
Paul Chavard
1488e0964b update models specs to use revisions 2020-09-02 11:26:26 +02:00
Paul Chavard
d1fb6c559e Update factories to use revisions 2020-09-02 11:26:26 +02:00
Paul Chavard
ec72fdd164 Remove migration service 2020-09-02 11:26:26 +02:00
Pierre de La Morinerie
a845922df6
Merge pull request #5518 from betagouv/fix-procedures-list-layout
Administrateur : correction de l'affichage du logo des démarches sous Safari
2020-09-01 18:21:07 +02:00
Pierre de La Morinerie
d5a2fc0788 views: fix Safari stretching logos in admin procedures list 2020-09-01 18:09:32 +02:00
Pierre de La Morinerie
ae1f14a3f9 views: reduce nested flex containers in admin procedures list
We can achieve the same layout with fewer nested flex containers.
2020-09-01 18:09:32 +02:00
Paul Chavard
e4a1b4a400
Merge pull request #5517 from betagouv/feat/5485-1
feat/5485 - carto : traduce edition buttons in french
2020-09-01 17:55:58 +02:00
kara Diaby
1788471664 carto hack : traduce edition buttons in french 2020-09-01 17:41:20 +02:00
jpoulvel
bc9d295396
Merge pull request #5512 from betagouv/i18n-devise
Adoption de la gem devise-i18n lorsque c'est possible
2020-09-01 17:05:33 +02:00
Judith
7eee9beed7 adapting the specs 2020-09-01 16:48:41 +02:00
Judith
9553dae7bd gem devise-i18n added to Gemfile to remove the config/locales/devises.*.yml files. 2020-09-01 16:47:40 +02:00
jpoulvel
ce4d447cd4
Merge pull request #5514 from betagouv/rails-i18n
Nettoyage des fichiers de localisation
2020-09-01 16:43:34 +02:00
Judith
25a24ba7c8 removal of translation keys already present in the gem rails-i18n 2020-09-01 16:33:58 +02:00
Pierre de La Morinerie
9bfd521a19
Merge pull request #5441 from adullact/5440_allow_to_disable_FranceConnect
Développement : ajout d'une variable d'environnement optionnelle `FRANCE_CONNECT_ENABLED` pour activer ou non France Connect
2020-09-01 16:04:44 +02:00
Fabrice Gangler
1a43f888fb Feat: allow to disable France-Connect
Refs: #5440
2020-09-01 15:51:10 +02:00
Pierre de La Morinerie
a4c830da70
Merge pull request #5463 from adullact/5462_fix_view_use_APPLICATION_NAME
Utilisation de APPLICATION_NAME dans views/users/sessions/new
2020-09-01 15:43:52 +02:00
Fabrice Gangler
f2c4378596 fix: use APPLICATION_NAME in view/users/sessions/new
Refs: #5462
2020-09-01 15:18:29 +02:00
Pierre de La Morinerie
d72d4158d1
Merge pull request #5513 from betagouv/contact-admin-EN
Internationalisation : traduction de la page /contact-admin en anglais
2020-09-01 15:13:06 +02:00
Judith
7bc5a0a278 internationalization of /contact-admin 2020-09-01 12:58:19 +00:00
Paul Chavard
e805529d5c
Merge pull request #5452 from adullact/5450_fix_for-using-APPLICATION_NAME-in-ENV-file
#5450 - Fix for using APPLICATION_NAME in .env file
2020-09-01 14:26:52 +02:00
Pierre de La Morinerie
383d33c167
Merge pull request #5460 from adullact/5456_fix_mailFooter_use_APPLICATION_NAME
Mailers : utilisation de la variable APPLICATION_NAME dans la signature
2020-09-01 14:18:37 +02:00
Fabrice Gangler
60d6b1909d Fix for using APPLICATION_NAME in .env file
Refs: #5450
2020-08-28 03:46:19 +02:00
Fabrice Gangler
bfb28e5a2b Fix(mailers/_signature): use APPLICATION_NAME
Refs: #5456
2020-08-28 03:44:46 +02:00
Pierre de La Morinerie
e1af27984f
Merge pull request #5508 from betagouv/publish-releases-on-sentry
ci: ajout d'un workflow GitHub Actions pour publier les releases sur Sentry
2020-08-27 18:19:38 +02:00
Pierre de La Morinerie
653d7d51bb ci: add workflow to publish releases to Sentry
See https://blog.sentry.io/2020/07/30/automate-release-management-with-the-sentry-release-github-action
2020-08-27 17:51:17 +02:00
Pierre de La Morinerie
cce8271d68
Merge pull request #5510 from betagouv/locate-with-ff 2020-08-27 17:15:17 +02:00
Pierre de La Morinerie
0dbe56cb78 gems: add http_accept_language to Gemfile.lock 2020-08-27 17:14:42 +02:00
Pierre de La Morinerie
7118fc88aa
Merge pull request #5504 from betagouv/locate-with-ff
Localisation : quand le feature-flag `localization` est activé, la langue par défaut est choisie en fonction des préférences exprimées par le navigateur
2020-08-27 16:27:44 +02:00
Judith
af25fdd77c gem http_accept_language installed and (de)activable with feature flag 2020-08-27 16:15:01 +02:00
Pierre de La Morinerie
ea16e71a8d
Merge pull request #5505 from betagouv/add-database-schema-vizualisation
docs: ajout d'un schéma de la base de données en PDF
2020-08-27 16:09:57 +02:00
Pierre de La Morinerie
1767df33b0 doc: add a visualization of the database models
Re-generate the schema using `bin/rake erd`.

NB: there's a way to update the PDF automatically after each migration.
But it requires `graphviz` to be installed locally, which I'm not
sure I want to require by default.
2020-08-27 12:02:28 +02:00
Pierre de La Morinerie
0570692d4a
Merge pull request #5489 from betagouv/allow-deselecting-all-checkbox-items
Usager : correction d'un problème où décocher toutes les cases d'une liste n'enregistrait pas les changements
2020-08-27 11:30:10 +02:00
Pierre de La Morinerie
0800bf68d0 views: allow unselecting all values from a multiple dropdown
Currently, deselecting all values from a multiple dropdown rendered as
checkboxes doesn't have any effect when submitting the form (the
previous values are still there, instead of being deselected).

This is because unchecked checkboxes are not sent by the browser – so
the "empty selection" never gets sent.

Rails `form.check_box` usually works around this by inserting an empty
hidden checkbox element, that will be sent even if all others are
de-selected. But the documentation warns that this is not possible when
iterating over an array (rather than a model). Which is our case here.

To fix this, this commit uses `collection_check_boxes` instead. It will
insert the proper hidden checkboxes in all cases, and fix our use case.

See https://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html#method-i-collection_check_boxes
2020-08-27 11:13:40 +02:00
Pierre de La Morinerie
f15b96cb3a
Merge pull request #5500 from betagouv/contact-page-EN
Mise en place de l'infrastructure de localisation de la page `/contact`
2020-08-27 11:13:25 +02:00
Judith
bfa4231f5e date and number formats changed according to rails-I18n locale 2020-08-27 11:03:34 +02:00
Judith
2f0953692c Internationalization of the Contact page in FR and EN 2020-08-27 11:03:34 +02:00
Paul Chavard
abd4e3c6cc
Merge pull request #5503 from betagouv/move-virus-scan-to-attachment
config: remove comment about ActiveStorage integration with VirusScanner
2020-08-27 09:29:24 +01:00
Pierre de La Morinerie
82c89fb56f config: remove comment about ActiveStorage integration with VirusScanner
As the comment states, it would be nice to load the Virus Scanner on
the Attachment (rather than the blob).

However, in order not to clobber the blob metadata, we want to run the
VirusScanner once the blob analyzer did run.

And the most direct way to detect that the blob analyzer did run is to
add an `on_update_commit` hook on the blob, as this hook will be
trigerred when saving changes to the metadata. This is what the current
solution uses. 

So the current solution is almost optimal, and has a low chance of
accidentally clobbering the blob metadata – as the virus scanner is only
started when the analysis phase is finished.
2020-08-26 16:11:01 +02:00
Pierre de La Morinerie
71d362c2fb
Merge pull request #5499 from betagouv/dependabot/npm_and_yarn/highcharts-8.1.1
build(deps): bump highcharts from 8.1.0 to 8.1.1
2020-08-25 17:58:56 +02:00
dependabot[bot]
cb2be72f45
build(deps): bump highcharts from 8.1.0 to 8.1.1
Bumps [highcharts](https://github.com/highcharts/highcharts-dist) from 8.1.0 to 8.1.1.
- [Release notes](https://github.com/highcharts/highcharts-dist/releases)
- [Commits](https://github.com/highcharts/highcharts-dist/compare/v8.1.0...v8.1.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-08-25 14:05:52 +00:00
Pierre de La Morinerie
8b82bf3b88
Merge pull request #5497 from betagouv/fix-autosave-error
Usager : correction d'erreurs lors de l'enregistrement automatique d'un dossier en brouillon après la suppression d'un bloc répétable
2020-08-25 15:54:49 +02:00
Pierre de La Morinerie
3fdecf0924 helpers: remove element immediately when no timeout is specified
This fixes an issue where clicking quickly on several "Remove row"
buttons on a repetition field results in autosave errors.

This is because the N+1 autosave request is correctly sent after the
Nth response from the server, but _before_ the row element is actually
removed from the DOM. So the N+1 request actually sends the fields for
the deleted row, which makes the server raise an error.

With this fix, the row gets properly removed when the server responds,
and before the next request is started.
2020-08-25 15:45:49 +02:00
Pierre de La Morinerie
ecc4f01c20 autosave: trigger an autosave after removing a row 2020-08-25 15:45:49 +02:00
Pierre de La Morinerie
96037069ff autosave: remove the repetition row after deletion
Before, when autosaving a draft, removing a repetition row would
send `_destroy` inputs to the controller – but not remove the row
from the DOM. This led to the `_destroy` inputs being sent again
on the next autosave request, which made the controller raise
(because the row fields were already deleted before).

To fix this, we let the controller response remove the deleted
row(s) from the DOM.

Doing it using a controller response avoids the need to keep track
of operations on the Javascript side: the controller can easily
know which row was just deleted, and emit the relevant changes for
the DOM. This keeps the autosave requests robust: even if a request
is skipped (e.g. because of a network interruption), the next request
will still contain the relevant informations to succeed, and not let the
form in an unstable state.

Fix #5470
2020-08-25 14:39:34 +02:00
Pierre de La Morinerie
e157a289e1 autosave: factorize some javascript code 2020-08-25 14:39:34 +02:00
Pierre de La Morinerie
a3dd81a89f
Merge pull request #5496 from betagouv/add-health-keywords-to-dubious-procedures
Super-admin : ajout de termes médicaux au détecteur automatique de données sensibles
2020-08-25 14:16:47 +02:00