Sha256: a10d57a43c32b68a10df05524115de44348605f361bf882e0e1778a35f4413ce

Contents?: true

Size: 1.31 KB

Versions: 1

Compression:

Stored size: 1.31 KB

Contents

<%%= form_for(@transcription) do |f| %>
  <%% if @transcription.errors.any? %>
    <div id="error_explanation">
      <h2><%%= pluralize(@transcription.errors.count, "error") %> prohibited this transcription from being saved:</h2>

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

  <% transcribable_attrs.each do |col, type| %>
    <div class="do_something">
      <% if [:string, :integer, :float, :decimal].include?(type) %>
        <h2><%= col.titleize %></h2>
        <%%= label_tag :<%= col %>, "Your attribute description here" %><br />
        <%%= f.text_field :<%= col %>, {:class => "wwwinput", :tabindex => 3}  %>
      <% end %>
      <% if [:text].include?(type) %>
        <h2><%= col.titleize %></h2>
        <div class="field" id="notes">
          <%%= f.label :<%= col %>, "Your attribute description here" %><br />
          <%%= f.text_area :<%= col %>, :size => "26x8", :class => "wwwinput", :style => "padding:5px;width:98%", :tabindex => 6  %>
        </div>
      <% end %>
    </div>
  <% end %>
  <%%= hidden_field_tag "<%= @table.singularize %>_id", @<%= @table.singularize %>.id %>
  <%%= submit_tag "Submit", :class => "fancy_btn full_width_btn green-btn", :id => "transcriptionsubmit"  %>
<%% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
transcribable-0.0.6 lib/generators/templates/views/_form.html.erb