Sha256: 639eb15f338f17d42e320d0a18901ac780bd4254a9fa7d21f17d6b07087661fb

Contents?: true

Size: 824 Bytes

Versions: 3

Compression:

Stored size: 824 Bytes

Contents

<%
  margin_top ||= 1
  margin_top_class = "gem-c-feedback--top-margin" if margin_top == 1

  def utf_encode(element)
    element.is_a?(String) ? element.encode : element
  end

  email_regex = /[^\s=\/?&]+(?:@|%40)[^\s=\/?&]+/
  url_without_pii = utf_encode(request.original_url.gsub(email_regex, '[email]'))
  path_without_pii = utf_encode(request.fullpath.gsub(email_regex, '[email]'))
%>

<div class="gem-c-feedback <%= margin_top_class %>" data-module="feedback">
  <%= render "govuk_publishing_components/components/feedback/yes_no_banner" %>
  <%= render "govuk_publishing_components/components/feedback/problem_form", url_without_pii: url_without_pii %>
  <%= render "govuk_publishing_components/components/feedback/survey_signup_form", url_without_pii: url_without_pii, path_without_pii: path_without_pii %>
</div>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
govuk_publishing_components-13.6.1 app/views/govuk_publishing_components/components/_feedback.html.erb
govuk_publishing_components-13.6.0 app/views/govuk_publishing_components/components/_feedback.html.erb
govuk_publishing_components-13.5.4 app/views/govuk_publishing_components/components/_feedback.html.erb