Sha256: 044e2583ebdb4fbb090aea045cd3b92b4a931bb98bafbf35f32ee7da176d24e4

Contents?: true

Size: 1.61 KB

Versions: 2

Compression:

Stored size: 1.61 KB

Contents

<div class="container">
<%-# This syntax [collections, @collection] tells form_for to use the routes from the engine named collections %>
<%= form_for @collection do |f| %>
  <% if @collection.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@collection.errors.count, "error") %> prohibited this topic from being saved:</h2>

      <ul>
      <% @collection.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <%#
    NOTE: We're just making it _look_ like we're using simple_form here. Refactor at will.
    ALSO: Title isn't _actually_ required. The form is lying (but it means well and is probably right).
  %>
  <div class="control-group string required collection_title">
    <span class="control-label">
      <label class="string required" for="collection_title">
        <abbr title="" data-original-title="required">*</abbr> Title
      </label>
    </span>
    <div class="controls">
      <%= f.text_field :title, class: 'string required input-xlarge', required: 'required', :'aria-required' => 'true' %>
    </div>
  </div>

  <div class="control-group string required collection_description">
    <span class="control-label">
      <%= f.label :description %>
    </span>
    <div class="controls">
      <%= f.text_area :description, class: 'text input-xxlarge' %>
    </div>
  </div>

  <%= render partial: 'form_permission', locals: {f: f} %>

  <%= hidden_collection_members %>

  <%= hidden_field_tag(:add_to_profile, @add_to_profile) %>

  <div class="form-actions">
    <%= f.submit class: 'btn btn-primary' %>
  </div>
<% end %>
</div>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
curate-0.5.4 app/views/curate/collections/_form.html.erb
curate-0.5.2 app/views/curate/collections/_form.html.erb