diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 4dff81461..ffb4d2d33 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -35,6 +35,10 @@ body { padding-top: 50px; } +.wysihtml5-sandbox { + resize:vertical; +} + #wrap { min-height: 100%; margin-bottom: -50px; diff --git a/app/views/admin/procedures/_informations.html.haml b/app/views/admin/procedures/_informations.html.haml index 6e649ac75..199762600 100644 --- a/app/views/admin/procedures/_informations.html.haml +++ b/app/views/admin/procedures/_informations.html.haml @@ -5,7 +5,11 @@ .form-group{class: ('has-error' if @procedure.errors.messages[key])} %h4 =value - =f.text_field key, class: 'form-control', placeholder: value + - if key == :description + = f.text_area key, rows: '6', placeholder: 'Description du projet', class: 'form-control wysihtml5' + + - else + =f.text_field key, class: 'form-control', placeholder: value .row .col-md-6.col-lg-6 diff --git a/app/views/admin/procedures/show.html.haml b/app/views/admin/procedures/show.html.haml index f03a292a2..af3d83e5d 100644 --- a/app/views/admin/procedures/show.html.haml +++ b/app/views/admin/procedures/show.html.haml @@ -54,7 +54,7 @@ %h4.text-info = @facade.procedure.libelle - = @facade.procedure.description + = @facade.procedure.description.html_safe .champs.col-md-4.col-lg-4 %h4.text-info Champs diff --git a/app/views/users/description/show.html.haml b/app/views/users/description/show.html.haml index 228da3ebc..4b686e316 100644 --- a/app/views/users/description/show.html.haml +++ b/app/views/users/description/show.html.haml @@ -1,5 +1,8 @@ .container#description_page - %h2 Description de votre projet + %h2 + = @dossier.procedure.libelle + %h3 Votre dossier + %br -#TODO use form_for @@ -7,12 +10,12 @@ %div .row .col-md-12 - %h4 Nom de votre projet * + %h4 Libellé pour votre dossier * = text_field_tag :nom_projet, @dossier.nom_projet, placeholder: 'Nom du projet', class: 'form-control' %br .row .col-md-12 - %h4 Description de votre projet * + %h4 Description * = text_area_tag :description, @dossier.description, rows: '6', placeholder: 'Description du projet', class: 'form-control wysihtml5' #liste_champs diff --git a/app/views/users/dossiers/new.html.haml b/app/views/users/dossiers/new.html.haml index fd09267fb..d40fcabd4 100644 --- a/app/views/users/dossiers/new.html.haml +++ b/app/views/users/dossiers/new.html.haml @@ -14,7 +14,7 @@ %h2#titre_procedure.text-info = @dossier.procedure.libelle %p - = @dossier.procedure.description + = @dossier.procedure.description.html_safe %br = form_for @dossier, url: {controller: 'users/dossiers', action: :create}, method: :post do |f| diff --git a/app/views/users/siret/_pro.html.haml b/app/views/users/siret/_pro.html.haml index 583bcbe49..34e119cb8 100644 --- a/app/views/users/siret/_pro.html.haml +++ b/app/views/users/siret/_pro.html.haml @@ -6,7 +6,7 @@ = @procedure.libelle %p - = @procedure.description + = @procedure.description.html_safe %br = form_tag(url_for({controller: :dossiers, action: :create}), class: 'form-inline', method: 'POST') do |f| diff --git a/spec/controllers/api/v1/procedures_controller_spec.rb b/spec/controllers/api/v1/procedures_controller_spec.rb index 0fe9a5dcb..a4134720a 100644 --- a/spec/controllers/api/v1/procedures_controller_spec.rb +++ b/spec/controllers/api/v1/procedures_controller_spec.rb @@ -32,7 +32,7 @@ describe API::V1::ProceduresController do it { expect(subject[:label]).to eq(procedure.libelle) } it { expect(subject[:description]).to eq(procedure.description) } it { expect(subject[:organisation]).to eq(procedure.organisation) } - it { expect(subject[:direction]).to eq(proced,ure.direction) } + it { expect(subject[:direction]).to eq(procedure.direction) } it { expect(subject[:link]).to eq(procedure.lien_demarche) } it { expect(subject[:archived]).to eq(procedure.archived) } it { is_expected.to have_key(:types_de_champ) }