openaustralia/planningalerts

View on GitHub
app/views/_tailwind/reports/new.html.erb

Summary

Maintainability
Test Coverage
<% content_for :page_title, "Report a comment" %>
<%= render Tailwind::Heading.new(tag: :h1) do %>
  <%= yield :page_title %>
<% end %>

<p class="mt-8 text-xl text-navy">
  This page is only for reporting comments that should be removed. Reasons can include that
  the comment is spam, abusive, unlawful or harassing &mdash; in other words, where people are going
  out of their way to cause harm. Please explain clearly why
  you think the comment should be removed.
</p>

<%= form_with model: [@comment, @report], builder: FormBuilders::Tailwind, class: "mt-12" do |f| %>
  <div>
    <%= f.label :details, "Why should the comment below be removed?" %>
    <%= f.text_area :details, class: "block w-full mt-4", rows: 8 %>
    <%= f.error :details %>
  </div>

  <div class="mt-6">
    <%= f.button "Send report" %>
  </div>
<% end %>

<div class="px-12 py-16 mt-12 border border-navy">
  <%= render @comment, show_extra: false %>
</div>