-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathnew.html.erb
More file actions
26 lines (23 loc) · 949 Bytes
/
new.html.erb
File metadata and controls
26 lines (23 loc) · 949 Bytes
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
<div class="page-header">
<h1>Product New</h1>
</div>
<div class="container col-md-4 col-md-offset-1">
<%= simple_form_for [:admin, @product],:html=> { role: 'form' } do |f| %>
<p>
<%= f.input :title, autofocus: true, label: '商品名稱', input_html: { class: 'form-control', required: true } %>
</p>
<p>
<%= f.input :description, as: :text , label: '商品描述', input_html: { class: 'form-control', required: true } %>
</p>
<p>
<%= f.input :quantity,autofocus: true, label: '商品數量', input_html: { class: 'form-control', required: true } %>
</p>
<p>
<%= f.input :price, autofocus: true, label: '商品價格', input_html: { class: 'form-control', required: true } %>
</p>
<p>
<%= f.input :image, as: :file , label: '商品圖片' %>
</p>
<%= f.submit "Submit", :class => "btn btn-lg btn-primary btn-block" %>
</div>
<% end %>