[#920] prefill siret when user has a siret
This commit is contained in:
parent
deb13673d7
commit
968aa92d77
4 changed files with 7 additions and 7 deletions
|
@ -1,6 +1,7 @@
|
|||
class Users::SiretController < UsersController
|
||||
def index
|
||||
@procedure = Procedure.find(params['procedure_id'])
|
||||
@siret = current_user.siret
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
error_procedure
|
||||
end
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
%p.lead{id: 'pro_section'}
|
||||
%h2#titre_procedure.text-info
|
||||
=@procedure.libelle
|
||||
= @procedure.libelle
|
||||
|
||||
%br
|
||||
= form_tag(url_for({controller: :dossiers, action: :create}), class: 'form-inline', method: 'POST') do |f|
|
||||
.form-group.form-group-lg
|
||||
= text_field_tag :siret, nil, :class => "form-control", :placeholder => "Entrez votre Siret", :id => "siret", :name => "siret", :maxlength => 14, :style => 'margin-bottom:10px'
|
||||
= text_field_tag :siret, nil, :class => "form-control", :placeholder => "Entrez votre Siret", :id => "siret", :name => "siret", :maxlength => 14, :style => 'margin-bottom:10px', value: @siret
|
||||
%br
|
||||
= submit_tag "Commencer", class: %w(btn btn-lg btn-success), style: 'margin-top:20px;', data: { disable_with: "Commencer", submit: true}
|
||||
%input{type: 'hidden', value: "#{@procedure.id}", name: 'procedure_id', id: 'procedure_id'}
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
.container.center#users_siret_index
|
||||
%h1.cover-heading <b>T</b>élé<b>P</b>rocédure administrative <b>S</b>implifiée
|
||||
%br
|
||||
%p{style: 'width:67%; margin-left:auto; margin-right:auto'}
|
||||
Site de démonstration d’un service public de saisie d’un projet ou de dépôt d’une démarche administrative, auprès d’un ou plusieurs organismes publics, simplifié des informations déjà connues des administrations, grâce à la fourniture du numéro SIRET.
|
||||
|
||||
.row
|
||||
= render partial: 'pro'
|
||||
|
||||
|
|
|
@ -72,6 +72,10 @@ feature 'France Connect Connexion' do
|
|||
scenario 'he is redirected to siret page' do
|
||||
expect(page).to have_css('#users_siret_index')
|
||||
end
|
||||
|
||||
scenario 'the siret is already written in form' do
|
||||
expect(page.find_by_id('siret').value).to have_content(siret)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue