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 $('', attrs).append($(this).contents()); - }); - - // Cancel link should not submit form - form.find('button.cancel-link').on('click', function(e){ - e.preventDefault(); - }); - } - Plugin.prototype = { init: function() { var $el = $(this.element); var $form = $($el).find('form'); - var $cancelLink = $el.find(".cancel-link"); - - // Replace "Cancel" link with link styled button - replaceLink($el, $cancelLink); //Add listener for form submit submitListener($el, $form); diff --git a/app/views/shared/feedback_forms/_form_fields.html.erb b/app/views/shared/feedback_forms/_form_fields.html.erb index 4b55c7d2d..bc3a1cac6 100644 --- a/app/views/shared/feedback_forms/_form_fields.html.erb +++ b/app/views/shared/feedback_forms/_form_fields.html.erb @@ -59,7 +59,7 @@