Merge pull request #1754 from betagouv/frederic/fix_1689-text_only_procedure_descriptions

[Fix #1689] Only allow plain text for procedure descriptions
This commit is contained in:
Frederic Merizen 2018-03-29 11:10:40 +02:00 committed by GitHub
commit 28cced9a95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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

View file

@ -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