From d825c3d5861f13a88c97641f18716d614102548e Mon Sep 17 00:00:00 2001 From: Frederic Merizen Date: Wed, 28 Mar 2018 17:30:08 +0200 Subject: [PATCH] [Fix #1689] Only allow plain text for procedure descriptions --- app/views/admin/procedures/_informations.html.haml | 2 +- spec/features/admin/procedure_cloning_spec.rb | 2 +- spec/features/admin/procedure_creation_spec.rb | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/admin/procedures/_informations.html.haml b/app/views/admin/procedures/_informations.html.haml index 542b96bd8..76f5568c8 100644 --- a/app/views/admin/procedures/_informations.html.haml +++ b/app/views/admin/procedures/_informations.html.haml @@ -7,7 +7,7 @@ %h4 = value - if key == :description - = f.text_area key, rows: '6', placeholder: 'Description du projet', class: 'form-control wysihtml5' + = f.text_area key, rows: '6', placeholder: 'Description du projet', class: 'form-control' - else = f.text_field key, class: 'form-control', placeholder: value diff --git a/spec/features/admin/procedure_cloning_spec.rb b/spec/features/admin/procedure_cloning_spec.rb index fc66029dc..8d8020641 100644 --- a/spec/features/admin/procedure_cloning_spec.rb +++ b/spec/features/admin/procedure_cloning_spec.rb @@ -12,7 +12,7 @@ feature 'As an administrateur I wanna clone a procedure', js: true do before 'Create procedure' do page.find_by_id('new-procedure').click fill_in 'procedure_libelle', with: 'libelle de la procedure' - page.execute_script("$('#procedure_description').data('wysihtml5').editor.setValue('description de la procedure')") + page.execute_script("$('#procedure_description').val('description de la procedure')") fill_in 'procedure_organisation', with: 'organisme de la procedure' page.find_by_id('save-procedure').click end diff --git a/spec/features/admin/procedure_creation_spec.rb b/spec/features/admin/procedure_creation_spec.rb index 84a2ce637..41a3a3f84 100644 --- a/spec/features/admin/procedure_creation_spec.rb +++ b/spec/features/admin/procedure_creation_spec.rb @@ -36,7 +36,7 @@ feature 'As an administrateur I wanna create a new procedure', js: true do page.find_by_id('save-procedure').click page.find_by_id('flash_message').visible? fill_in 'procedure_libelle', with: 'libelle de la procedure' - page.execute_script("$('#procedure_description').data('wysihtml5').editor.setValue('description de la procedure')") + page.execute_script("$('#procedure_description').val('description de la procedure')") fill_in 'procedure_organisation', with: 'organisme de la procedure' page.find_by_id('save-procedure').click expect(page).to have_current_path(admin_procedure_types_de_champ_path(Procedure.first.id.to_s)) @@ -47,7 +47,7 @@ feature 'As an administrateur I wanna create a new procedure', js: true do before 'Create procedure' do page.find_by_id('new-procedure').click fill_in 'procedure_libelle', with: 'libelle de la procedure' - page.execute_script("$('#procedure_description').data('wysihtml5').editor.setValue('description de la procedure')") + page.execute_script("$('#procedure_description').val('description de la procedure')") fill_in 'procedure_organisation', with: 'organisme de la procedure' page.find_by_id('save-procedure').click end