-
Notifications
You must be signed in to change notification settings - Fork 0
/
new.html.erb
42 lines (41 loc) · 1.46 KB
/
new.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<div class="container">
<div class="row justify-content-center">
<div class="col-sm-6">
<div class="card mt-5">
<div class="card-header font-weight-bold">Agregar Libro</div>
<%= form_for @book do |f| %>
<div class="card-body">
<div class="form-group">
<%= f.label :title %>
<%= f.text_field :title, class: "form-control", autofocus: true %>
</div>
<div class="form-group">
<%= f.label :author %>
<%= f.text_field :author, class: "form-control" %>
</div>
<div class="form-group">
<%= f.label :description %>
<%= f.text_area :description, rows: 4, class: "form-control" %>
</div>
<div class="form-group">
<%= f.label :image_url %>
<%= f.url_field :image_url, class: "form-control" %>
</div>
<div class="form-group">
<%= f.label :publication_date %>
<%= f.date_field :publication_date, class: "form-control" %>
</div>
<div class="form-group">
<%= f.label :price %>
<%= f.number_field :price, class: "form-control", step: :any %>
</div>
</div>
<div class="card-footer text-right">
<%= link_to "Cancelar", books_path, class: "btn btn-default" %>
<%= f.submit class: "btn btn-primary" %>
</div>
<% end %>
</div>
</div>
</div>
</div>