18F/identity-idp

View on GitHub
app/components/javascript_required_component.html.erb

Summary

Maintainability
Test Coverage
<noscript>
  <%= render StatusPageComponent.new(status: :error) do |c| %>
    <% c.with_header { header } %>

    <% if intro %>
      <p><%= intro %></p>
    <% end %>

    <p><%= t('components.javascript_required.browser_instructions') %></p>

    <ul class="usa-list">
      <% browser_resources.each do |resource| %>
        <li><%= new_tab_link_to resource[:name], resource[:url] %></li>
      <% end %>
    </ul>

    <p><strong><%= t('components.javascript_required.next_step') %></strong></p>
  <% end %>
  <link rel="stylesheet" href="<%= no_js_detect_css_path(location:) %>">
</noscript>
<div class="js">
  <% if was_no_js? %>
    <%= render AlertComponent.new(type: :success, class: 'margin-bottom-4') do %>
      <%= t('components.javascript_required.enabled_alert') %>
    <% end %>
  <% end %>
  <%= content %>
</div>