Sha256: 68d89d93309ad700b2e455c7e0bb6a94d0a2cfbb4f5604f6d90abd70941c19f7
Contents?: true
Size: 879 Bytes
Versions: 4
Compression:
Stored size: 879 Bytes
Contents
<% @orm.column_fields.each_with_index do |column, index| -%> <%% error = <%= @orm.has_error(column[:name]) %> %> <fieldset class='control-group <%%= error ? 'has-error' : ''%>'> <%%= f.label :<%= column[:name] %>, :class => 'control-label' %> <div class='controls'> <%%= f.<%= column[:field_type] %> :<%= column[:name] %>, :class => 'input-xlarge input-with-feedback'<%- if (index == 0) -%>, :autofocus => true<%- end -%> %> <span class='help-inline'><%%= error ? f.error_message_on(:<%= column[:name] %>) : "Ex: a simple text" %></span> </div> </fieldset> <% end %> <div class="form-actions"> <%%= f.submit pat(:save), :class => 'btn btn-primary' %> <%%= f.submit pat(:save_and_continue), :class => 'btn btn-info', :name => 'save_and_continue' %> <%%= link_to pat(:cancel), url(:<%= @orm.name_plural %>, :index), :class => 'btn' %> </div>
Version data entries
4 entries across 4 versions & 1 rubygems