Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2019
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. <div class="container">
  2.  
  3. <h2> Edit Novel Details</h2>
  4.  
  5. <%= form_for @novel do |f| %>
  6.  
  7. <div class="form-group">
  8.  
  9. <%= f.label :title %><br />
  10.  
  11. <%= f.text_field :title, class:'form-control' %><br />
  12.  
  13. <%= f.label :isbn %><br />
  14.  
  15. <%= f.number_field :isbn, class:'form-control' %><br />
  16.  
  17. <%= f.label :format %><br />
  18.  
  19. <%= f.text_field :format, class:'form-control' %><br />
  20.  
  21. <%= f.label :genre %><br />
  22.  
  23. <%= f.select :genre_id, Genre.all.collect {|x| [x.name, x.id]}, {:include_blank => 'Select Genre'}, class:'form-control' %><br />
  24.  
  25. <%= f.label :author %><br />
  26.  
  27. <%= f.select :author_id, Author.all.collect {|x| [x.fname + ' '+ x.lname, x.id]}, {:include_blank => 'Select Author'}, class:'form-control' %><br />
  28.  
  29. <%= f.label :publisher %><br />
  30.  
  31. <%= f.select :publisher_id, Publisher.all.collect {|x| [x.name, x.id]}, {:include_blank => 'Select Publisher'}, class:'form-control' %><br />
  32.  
  33. <%= f.label :price %><br />
  34.  
  35. <%= f.text_field :price, class:'form-control' %><br />
  36.  
  37. <%= f.label :publication %><br />
  38.  
  39. <%= f.text_field :publication, class:'form-control' %><br />
  40.  
  41. <%= f.label :description %><br />
  42.  
  43. <%= f.text_area :description, class:'form-control' %><br />
  44.  
  45. <%= f.label :pages %><br />
  46.  
  47. <%= f.text_field :pages, class:'form-control' %><br />
  48.  
  49. <%= f.submit "Submit", class:'btn btn-primary' %>
  50. <%=link_to "Cancel", novels_path, class:'btn btn-default' %>
  51.  
  52. <% end %>
  53.  
  54. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement