7708dbbc71
Starting from Rails 5.1, `form_with` behavior is to generate remote forms by default. However with Turbolinks disabled, the form gets sent, but nothing is set up to handle the server response (like replacing the content of the page). So we have two choices: either enable a global config option that makes `form_with` generate non-remote forms, or do it explicitely on each form. I chose the explicit way, so that developers expecting the usual remote behavior of `form_with` are not surprised.
24 lines
1.1 KiB
Text
24 lines
1.1 KiB
Text
= render partial: 'new_administrateur/breadcrumbs',
|
|
locals: { steps: [link_to('Démarches', admin_procedures_path),
|
|
link_to(@procedure.libelle, admin_procedure_path(@procedure)),
|
|
'Jeton'] }
|
|
|
|
.container
|
|
%h1.page-title
|
|
Configurer le jeton API Entreprise
|
|
|
|
.container
|
|
%h1
|
|
= form_with model: @procedure, url: url_for({ controller: 'new_administrateur/procedures', action: :update_jeton }), local: true, html: { class: 'form' } do |f|
|
|
%p.explication
|
|
Démarches Simplifiées utilise
|
|
= link_to 'API Entreprise', "https://entreprise.api.gouv.fr/"
|
|
qui permet de récupérer les informations administratives des entreprises et des associations.
|
|
Si votre démarche nécessite des autorisations spécifiques que Démarches Simplifiées n'a pas par défaut, merci de renseigner ici le jeton
|
|
= link_to 'API Entreprise', "https://entreprise.api.gouv.fr/demander_un_acces/"
|
|
propre à votre démarche.
|
|
|
|
= f.label :api_entreprise_token, "Jeton"
|
|
= f.password_field :api_entreprise_token, class: 'form-control'
|
|
.text-right
|
|
= f.button 'Enregistrer', class: 'button primary send'
|