Sha256: 59eb3183d104dd058ca102a4f811777d7704c92be9f49a8f993c1438814bec28

Contents?: true

Size: 1.25 KB

Versions: 15

Compression:

Stored size: 1.25 KB

Contents

<%%= form_for [:spud, :admin, @<%=module_name_formatted.singularize%>], :html => {:class => 'form-horizontal'} do |f| %>

<%%= error_messages_for(f.object) %>

  <fieldset>
    <legend>Details</legend>
    <%attributes.each do |attribute|%>
      <%attribute_args = attribute.split(":")%>
      <div class="control-group">
        <%%= f.label :<%=attribute_args[0]%>, :class => "control-label" %>
        <div class="controls">
          <%if attribute_args[1] == 'integer'%>
            <%%= f.number_field :<%=attribute_args[0]%> %>
          <%elsif attribute_args[1] == 'string'%>
            <%%= f.text_field :<%=attribute_args[0]%> %>
          <%elsif attribute_args[1] == 'text'%>
            <%%= f.text_area :<%=attribute_args[0]%>, :rows => 4 %>
          <%elsif attribute_args[1] == 'boolean'%>
            <%%= f.check_box :<%=attribute_args[0]%>%>
          <%else%>
            <%%= f.text_field :<%=attribute_args[0]%> %>
          <%end%>
        </div>
      </div>
    <%end%>
  </fieldset>


  <div class="form-actions">
    <%%=f.submit "Save <%=module_name_formatted.singularize.humanize.titlecase%>", :class=>"btn btn-primary form-btn","data-loading-text"=>"Saving..."%> or <%%=link_to "cancel",request.referer,:class => "btn"%>
  </div>

<%% end %>

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
spud_core-1.0.6 lib/generators/spud/templates/views/admin/_form.html.erb
spud_core-1.0.5 lib/generators/spud/templates/views/admin/_form.html.erb
spud_core-1.0.4 lib/generators/spud/templates/views/admin/_form.html.erb
spud_core-1.0.3 lib/generators/spud/templates/views/admin/_form.html.erb
spud_core-1.0.2 lib/generators/spud/templates/views/admin/_form.html.erb
spud_core-1.0.1 lib/generators/spud/templates/views/admin/_form.html.erb
spud_core-1.0.0 lib/generators/spud/templates/views/admin/_form.html.erb
spud_core-1.0.0.rc2 lib/generators/spud/templates/views/admin/_form.html.erb
spud_core-1.0.0.rc1.1 lib/generators/spud/templates/views/admin/_form.html.erb
spud_core-1.0.0.rc1 lib/generators/spud/templates/views/admin/_form.html.erb
spud_core-0.9.22 lib/generators/spud/templates/views/admin/_form.html.erb
spud_core-0.9.21 lib/generators/spud/templates/views/admin/_form.html.erb
spud_core-0.9.20 lib/generators/spud/templates/views/admin/_form.html.erb
spud_core-0.9.19 lib/generators/spud/templates/views/admin/_form.html.erb
spud_core-0.9.18 lib/generators/spud/templates/views/admin/_form.html.erb