diff --git a/app/javascript/feedback_form.js b/app/javascript/feedback_form.js index 5e9203ff8..62ec8bc99 100644 --- a/app/javascript/feedback_form.js +++ b/app/javascript/feedback_form.js @@ -79,33 +79,11 @@ Blacklight.onLoad(function(){ }); } - function replaceLink(form, link) { - var attrs = {}; - $.each(link[0].attributes, function(idx, attr) { - attrs[attr.nodeName] = attr.value; - }); - attrs.class = 'cancel-link btn btn-link'; - - // Replace the cancel link with a button - link.replaceWith(function() { - return $(' - <%= link_to "Cancel", :back, class:"cancel-link", data: { toggle: 'collapse', target: target } %> + diff --git a/spec/features/connection_form_spec.rb b/spec/features/connection_form_spec.rb index c6e242843..8fd4174cc 100644 --- a/spec/features/connection_form_spec.rb +++ b/spec/features/connection_form_spec.rb @@ -40,7 +40,6 @@ scenario 'connection form should be shown filled out and submitted' do find('.connection-problem').click expect(page).to have_css('#connection-form', visible: true) - expect(page).to have_css('a', text: 'Cancel') within 'form.feedback-form' do fill_in('resource_name', with: 'Resource name') fill_in('problem_url', with: 'http://www.example.com/yolo') diff --git a/spec/features/feedback_form_spec.rb b/spec/features/feedback_form_spec.rb index 721c8c1c2..6f78d0f4b 100644 --- a/spec/features/feedback_form_spec.rb +++ b/spec/features/feedback_form_spec.rb @@ -35,7 +35,6 @@ click_link "Feedback" expect(page).to have_css("#feedback-form", visible: true) expect(page).to have_css("#feedback_message", count: 1) - expect(page).to have_css("a", text: "Cancel") within "form.feedback-form" do fill_in("message", with: "This is only a test") fill_in("name", with: "Ronald McDonald")