roseweixel/lacquer-lover

View on GitHub
app/views/static_pages/_contact.html.erb

Summary

Maintainability
Test Coverage
<%= form_tag send_feedback_email_path, class:"form-horizontal" do %>
  <% if current_user %>
    <%= select_tag 'reply_address', options_for_select([current_user.email, "other email address"]), class:"form-control", id:"email-options" %>
    <%= text_field_tag 'other_reply_address', nil, placeholder: "your email address", class:"other-email form-control", style:"display:none;" %>
  <% else %>
    <%= text_field_tag 'other_reply_address', nil, :required => true, placeholder: 'your email', class: "form-control" %>
  <% end %>
  <br>
  <%= label_tag 'Subject' %>
  <%= select_tag 'subject', options_for_select(["feature request", "something is broken", "other"]), class:"form-control", id:"subject-options", :include_blank => 'Please select a subject', required: true %>
  <%= text_field_tag 'other_subject', nil, placeholder: "message subject", class:"form-control", id:"other_subject", style:"display:none;" %>
  <br>
  <%= text_area_tag 'body', nil, :required => true, class:"form-control", style:"height: 260px;", placeholder: 'your message' %><br>

  <%= hidden_field_tag :to_address, 'lacquerloveandlend@gmail.com' %>
  <%= submit_tag "Send", class:"btn btn-default" %>
  <span class="pull-right">
  <%= label_tag 'send me a copy' %>
  <%= check_box_tag 'bcc', true, true %>
  </span>
<% end %>