edit api
This commit is contained in:
@@ -28,13 +28,7 @@
|
||||
<div class ="form-group" >
|
||||
<label for="address" class="string optional control-label">Address:</label>
|
||||
<%= f.input :address,:error=>false,:label =>false,:placeholder =>'Please enter client address',input_html: { class: "form-control" } %>
|
||||
</div>
|
||||
<div class ="form-group" >
|
||||
<label for="product_type" class="string optional control-label">Product Type:</label>
|
||||
<%= f.select :product_type,options_for_select([['CARD','card'],['TICKET','ticket']], params[:product_type]),
|
||||
{}, { :class => 'form-control' } %>
|
||||
<%= f.error :product_type ,style: 'color: red' %>
|
||||
</div>
|
||||
</div>
|
||||
<div class ="form-group" >
|
||||
<label></label>
|
||||
<div class="actions">
|
||||
|
||||
@@ -21,8 +21,7 @@
|
||||
<th>Name</th>
|
||||
<th>Email</th>
|
||||
<th>Phone</th>
|
||||
<th>Address</th>
|
||||
<th>Product Type</th>
|
||||
<th>Address</th>
|
||||
<th>Created At </th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
@@ -33,15 +32,14 @@
|
||||
<td><%= client.name rescue '' %></td>
|
||||
<td><%= client.email rescue '' %></td>
|
||||
<td><%= client.phone rescue '' %></td>
|
||||
<td><%= client.address rescue '' %></td>
|
||||
<td><%= client.product_type rescue '' %></td>
|
||||
<td><%= client.address rescue '' %></td>
|
||||
<td><%= client.created_at.strftime("%e,%b %Y %I:%M %p") rescue '' %></td>
|
||||
<td>
|
||||
<%= link_to 'Detail',
|
||||
client_path(client), :class => 'btn btn-primary btn-sm' %>
|
||||
<%= link_to 'Edit',
|
||||
edit_client_path(client), :class => 'btn btn-primary btn-sm' %>
|
||||
<%= link_to 'Delete', clients_path(client), method: :delete, data: { confirm: 'Are you sure?' },:class => 'btn btn-primary btn-sm' %>
|
||||
<%= link_to 'Delete', client_path(client), method: :delete, data: { confirm: 'Are you sure?' },:class => 'btn btn-primary btn-sm' %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user