Add type de champ Engagement
This commit is contained in:
parent
d455b6f12d
commit
8fb76d1a6e
7 changed files with 19 additions and 4 deletions
|
@ -15,6 +15,7 @@ class TypeDeChamp < ActiveRecord::Base
|
|||
pays: 'pays',
|
||||
regions: 'regions',
|
||||
departements: 'departements',
|
||||
engagement: 'engagement',
|
||||
header_section: 'header_section'
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
%a{href: "#invites", 'aria-controls' => "invites", role: "tab", 'data-toggle' => "tab"}
|
||||
Invités
|
||||
|
||||
- if gestionnaire_signed_in? && !request.env['PATH_INFO'].include?('users/dossiers')
|
||||
- if gestionnaire_signed_in? && (!request.env['PATH_INFO'].include?('users/dossiers') )
|
||||
%li{role: "presentation"}
|
||||
%a{href: "#followers", 'aria-controls' => "followers", role: "tab", 'data-toggle' => "tab"}
|
||||
Abonnés
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
-actual_header_section = champ.id
|
||||
|
||||
-else
|
||||
- unless champ.type_champ == 'checkbox'
|
||||
- unless champ.type_champ == 'checkbox' || champ.type_champ == 'engagement'
|
||||
%h4
|
||||
= champ.libelle
|
||||
- if champ.mandatory?
|
||||
|
@ -38,6 +38,9 @@
|
|||
- elsif champ.type_champ == 'regions'
|
||||
=render partial: 'users/description/champs/regions', locals: {champ: champ}
|
||||
|
||||
- elsif champ.type_champ == 'engagement'
|
||||
=render partial: 'users/description/champs/engagement', locals: {champ: champ}
|
||||
|
||||
- elsif champ.type_champ == 'departements'
|
||||
=render partial: 'users/description/champs/departements', locals: {champ: champ}
|
||||
|
||||
|
|
8
app/views/users/description/champs/_engagement.html.haml
Normal file
8
app/views/users/description/champs/_engagement.html.haml
Normal file
|
@ -0,0 +1,8 @@
|
|||
%h4{style:'margin-left:15px;'}
|
||||
= champ.libelle
|
||||
- if champ.mandatory?
|
||||
= '*'
|
||||
%input{type: 'hidden', name:"champs['#{champ.id}']", id: "champs_#{champ.id}", value: ''}
|
||||
%input{type: 'checkbox', style:'margin-left: 15px;', name:"champs['#{champ.id}']", id: "champs_#{champ.id}", checked: ('checked' if champ.value == 'on')}
|
||||
%div{style:'margin-left: 5%; margin-right: 5%; text-align: justify; text-justify: inter-word;'}
|
||||
= champ.description.gsub(/\r\n/, '<br>').html_safe
|
|
@ -1,3 +1,3 @@
|
|||
remote_storage: true
|
||||
unified_login: true
|
||||
opensimplif: true
|
||||
unified_login: false
|
||||
opensimplif: false
|
||||
|
|
|
@ -20,4 +20,5 @@ fr:
|
|||
pays: 'Pays'
|
||||
regions: 'Régions'
|
||||
departements: 'Départements'
|
||||
engagement: 'Engagement'
|
||||
header_section: 'Titre de section'
|
|
@ -9,6 +9,8 @@ describe 'backoffice/dossiers/show.html.haml', type: :view do
|
|||
before do
|
||||
sign_in gestionnaire
|
||||
assign(:facade, (DossierFacades.new dossier.id, gestionnaire.email))
|
||||
|
||||
@request.env['PATH_INFO'] = 'backoffice/user'
|
||||
end
|
||||
|
||||
context 'on the dossier gestionnaire page' do
|
||||
|
|
Loading…
Reference in a new issue