Advertisement
Guest User

Untitled

a guest
Aug 20th, 2015
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.27 KB | None | 0 0
  1. <%= simple_form_for @project, html: { class: 'saveable-form' } do |f| %>
  2.     <%= f.error_notification %>
  3.     <div class="constrained opened">
  4.       <div class="form-inputs">
  5.         <%= f.input :name %>
  6.         <%= f.input :description, as: :ckeditor %>
  7.         <%= f.input :reasons, as: :ckeditor %>
  8.         <%= f.input :challenge, as: :ckeditor %>
  9.         <%= f.input :category_id, as: :hidden %>
  10.         <% Category.all.each do |cat| %>
  11.             <div class="clickable category <%= @project.category_id == cat.id ? 'active' : 'inactive' %>"><%= cat.name %></div>
  12.         <% end %>
  13.         <%= f.input :start_date %>
  14.         <%= f.input :end_date %>
  15.         <%= f.input :target_amount %>
  16.         <%= f.input :video %>
  17.       </div>
  18.     </div>
  19.  
  20.     <div class="constrained closed">
  21.       <%= f.simple_fields_for :rewards do |reward| %>
  22.           <%= render 'reward_fields', f: reward %>
  23.       <% end %>
  24.  
  25.       <div class="links">
  26.         <%= link_to_add_association 'add reward', f, :rewards %>
  27.       </div>
  28.     </div>
  29.  
  30.     <div class="constrained closed">
  31.       <%= f.simple_fields_for :user do |user| %>
  32.           <%= render 'user_fields', f: user %>
  33.       <% end %>
  34.     </div>
  35.  
  36.     <div class="form-actions">
  37.       <%= f.button :submit %>
  38.     </div>
  39. <% end %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement