Commit a3b3b5d3 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'fixed-edit-form-failing-test' into 'master'

Fixed edit form authenticity_token call failing the tests

See merge request !8472
parents 0b2a28b9 cb537324
...@@ -895,7 +895,9 @@ ...@@ -895,7 +895,9 @@
new GLForm($editForm.find('form')); new GLForm($editForm.find('form'));
$editForm.find('form').attr('action', postUrl); $editForm.find('form')
.attr('action', postUrl)
.attr('data-remote', 'true');
$editForm.find('.js-form-target-id').val(targetId); $editForm.find('.js-form-target-id').val(targetId);
$editForm.find('.js-form-target-type').val(targetType); $editForm.find('.js-form-target-type').val(targetType);
$editForm.find('.js-note-text').focus().val(originalContent); $editForm.find('.js-note-text').focus().val(originalContent);
......
.note-edit-form .note-edit-form
= form_tag '#', method: :put, remote: true, class: 'edit-note common-note-form js-quick-submit' do = form_tag '#', method: :put, class: 'edit-note common-note-form js-quick-submit' do
= hidden_field_tag :authenticity_token, form_authenticity_token
= hidden_field_tag :target_id, '', class: 'js-form-target-id' = hidden_field_tag :target_id, '', class: 'js-form-target-id'
= hidden_field_tag :target_type, '', class: 'js-form-target-type' = hidden_field_tag :target_type, '', class: 'js-form-target-type'
= render layout: 'projects/md_preview', locals: { preview_class: 'md-preview', referenced_users: true } do = render layout: 'projects/md_preview', locals: { preview_class: 'md-preview', referenced_users: true } do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment