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',
|
pays: 'pays',
|
||||||
regions: 'regions',
|
regions: 'regions',
|
||||||
departements: 'departements',
|
departements: 'departements',
|
||||||
|
engagement: 'engagement',
|
||||||
header_section: 'header_section'
|
header_section: 'header_section'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
%a{href: "#invites", 'aria-controls' => "invites", role: "tab", 'data-toggle' => "tab"}
|
%a{href: "#invites", 'aria-controls' => "invites", role: "tab", 'data-toggle' => "tab"}
|
||||||
Invités
|
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"}
|
%li{role: "presentation"}
|
||||||
%a{href: "#followers", 'aria-controls' => "followers", role: "tab", 'data-toggle' => "tab"}
|
%a{href: "#followers", 'aria-controls' => "followers", role: "tab", 'data-toggle' => "tab"}
|
||||||
Abonnés
|
Abonnés
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
-actual_header_section = champ.id
|
-actual_header_section = champ.id
|
||||||
|
|
||||||
-else
|
-else
|
||||||
- unless champ.type_champ == 'checkbox'
|
- unless champ.type_champ == 'checkbox' || champ.type_champ == 'engagement'
|
||||||
%h4
|
%h4
|
||||||
= champ.libelle
|
= champ.libelle
|
||||||
- if champ.mandatory?
|
- if champ.mandatory?
|
||||||
|
@ -38,6 +38,9 @@
|
||||||
- elsif champ.type_champ == 'regions'
|
- elsif champ.type_champ == 'regions'
|
||||||
=render partial: 'users/description/champs/regions', locals: {champ: champ}
|
=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'
|
- elsif champ.type_champ == 'departements'
|
||||||
=render partial: 'users/description/champs/departements', locals: {champ: champ}
|
=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
|
remote_storage: true
|
||||||
unified_login: true
|
unified_login: false
|
||||||
opensimplif: true
|
opensimplif: false
|
||||||
|
|
|
@ -20,4 +20,5 @@ fr:
|
||||||
pays: 'Pays'
|
pays: 'Pays'
|
||||||
regions: 'Régions'
|
regions: 'Régions'
|
||||||
departements: 'Départements'
|
departements: 'Départements'
|
||||||
|
engagement: 'Engagement'
|
||||||
header_section: 'Titre de section'
|
header_section: 'Titre de section'
|
|
@ -9,6 +9,8 @@ describe 'backoffice/dossiers/show.html.haml', type: :view do
|
||||||
before do
|
before do
|
||||||
sign_in gestionnaire
|
sign_in gestionnaire
|
||||||
assign(:facade, (DossierFacades.new dossier.id, gestionnaire.email))
|
assign(:facade, (DossierFacades.new dossier.id, gestionnaire.email))
|
||||||
|
|
||||||
|
@request.env['PATH_INFO'] = 'backoffice/user'
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'on the dossier gestionnaire page' do
|
context 'on the dossier gestionnaire page' do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue