Sha256: c39a094533dfb03072ff2c230a9858240d614ed0e6f01d1b295314761020d025

Contents?: true

Size: 1.72 KB

Versions: 3

Compression:

Stored size: 1.72 KB

Contents

<h1>Contact</h1>
<div class="alert alert-info">
  <%= render 'directions' %>
</div>

<% if user_signed_in? %>
  <% nm = current_user.name %>
  <% em = current_user.email_address %>
<% else %>
  <% nm = '' %>
  <% em = '' %>
<% end %>

<h2>Contact Form</h2>
<%= form_for @contact_form, url: sufia.contact_form_index_path,
                            html: { class: 'form-horizontal' } do |f| %>
  <%= f.text_field :contact_method, class: 'hide' %>
  <div class="form-group">
    <%= f.label :category, 'Issue Type', class: "col-sm-2 control-label" %>
    <% issue_types = ContactForm::ISSUE_TYPES.dup %>
    <% issue_types.unshift(['Select an Issue Type', nil]) %>
    <div class="col-sm-10">
      <%= f.select 'category', options_for_select(issue_types), {}, {class: 'form-control', required: true } %>
    </div>
  </div>

  <div class="form-group">
    <%= f.label :name, 'Your Name', class: "col-sm-2 control-label" %>
    <div class="col-sm-10"><%= f.text_field :name, value: nm, class: 'form-control', required: true %></div>
  </div>

  <div class="form-group">
    <%= f.label :email, 'Your Email', class: "col-sm-2 control-label" %>
    <div class="col-sm-10"><%= f.text_field :email, value: em, class: 'form-control', required: true %></div>
  </div>

  <div class="form-group">
    <%= f.label :subject, 'Subject', class: "col-sm-2 control-label" %>
    <div class="col-sm-10"><%= f.text_field :subject, class: 'form-control', required: true %></div>
  </div>

  <div class="form-group">
    <%= f.label :message, 'Message', class: "col-sm-2 control-label" %>
    <div class="col-sm-10"><%= f.text_area :message, rows: 4, class: 'form-control', required: true %></div>
  </div>

  <%= f.submit value: "Send", class: "btn btn-primary" %>
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sufia-7.0.0.beta3 app/views/contact_form/new.html.erb
sufia-7.0.0.beta2 app/views/contact_form/new.html.erb
sufia-7.0.0.beta1 app/views/contact_form/new.html.erb