openaustralia/planningalerts

View on GitHub
app/views/comments/_form.html.haml

Summary

Maintainability
Test Coverage
= semantic_form_for [application, comment] do |f|
  = f.inputs id: "comment-base-inputgroup" do
    = f.input :text, as: :text, input_html: { rows: "10" },
                     hint: t("formtastic.hints.comment.text", link: faq_path(anchor: "disclosure"), target: "#disclosure_explanation", class: "hideable")
    .inline-hints.hideable-target#disclosure_explanation
      = render partial: "documentation/disclosure_explanation"
    = f.input :name
  = f.inputs id: "comment-detail-inputgroup" do
    = f.input :address, input_html: { class: "address-autocomplete-input" },
                        hint: t("formtastic.hints.comment.address", link: faq_path(anchor: "address"), target: "#faq_commenting_address", class: "hideable")
    .inline-hints.hideable-target#faq_commenting_address
      = render partial: "documentation/faq_commenting_address"
  = f.actions id: "comment-action-inputgroup" do
    = f.action :submit, label: "Post your public comment",
                        button_html: { class: "button button-action" }