<commit_before><h2>You cart:</h2>

<table class="table table-striped"> 
	<thead> 
	<tr> 
	 
	<th>Name</th> 
	<th>Price</th> 
	<th>Qty</th> 
	</tr> 
	</thead> 
	<tbody> 

	<% total_price = 0 %>
	<% total_qty = 0 %>

	<% @items.each do |item| %>
	<tr> 
	 
	<td><%= item[0].title %></td> 
	<td><%= item[0].price %></td> 
	<td><%= item[1] %></td> </tr> 
	<% total_price += item[0].price * item[1].to_i %>
	<% total_qty += item[1].to_i %>
	<% end %>
	<tr> 
	 
	<td></td> 
	<td>Total:<%= total_price %>Rub</td> 
	<td><%= total_qty %></td> </tr> 
	</tbody> 
</table>



<form action="/place_order" method="POST" role="form">
<input name="order[order]" type="hidden" value="<%= @orders_input %>"
	<div class="form-group">
    <label>Name</label>
    <input name="order[name]" type="text" class="form-control" placeholder="Your name" >
  </div>

  <div class="form-group">
    <label>Phone</label>
    <input name="order[phone]" type="text" class="form-control" placeholder="Your phone" >
  </div>

  <div class="form-group">
    <label>Address</label>
    <textarea name="order[address]" type="text" class="form-control" placeholder="Your adress" ></textarea>
  </div>

 <button type="submit" class="btn-lg btn-success">Place this order</button>

</form><commit_msg>add cancel button and js handler<commit_after><h2>You cart:</h2>

<table class="table table-striped"> 
	<thead> 
	<tr> 
	 
	<th>Name</th> 
	<th>Price</th> 
	<th>Qty</th> 
	</tr> 
	</thead> 
	<tbody> 

	<% total_price = 0 %>
	<% total_qty = 0 %>

	<% @items.each do |item| %>
	<tr> 
	 
	<td><%= item[0].title %></td> 
	<td><%= item[0].price %></td> 
	<td><%= item[1] %></td> </tr> 
	<% total_price += item[0].price * item[1].to_i %>
	<% total_qty += item[1].to_i %>
	<% end %>
	<tr> 
	 
	<td></td> 
	<td>Total:<%= total_price %>Rub</td> 
	<td><%= total_qty %></td> </tr> 
	</tbody> 
</table>



<form action="/place_order" method="POST" role="form">
<input name="order[order]" type="hidden" value="<%= @orders_input %>"
	<div class="form-group">
    <label>Name</label>
    <input name="order[name]" type="text" class="form-control" placeholder="Your name" >
  </div>

  <div class="form-group">
    <label>Phone</label>
    <input name="order[phone]" type="text" class="form-control" placeholder="Your phone" >
  </div>

  <div class="form-group">
    <label>Address</label>
    <textarea name="order[address]" type="text" class="form-control" placeholder="Your adress" ></textarea>
  </div>

 <button type="submit" class="btn-lg btn-success">Place this order</button>
<button   class="btn-lg btn-danger" onclick="return false">Cancel</button>
</form>
{'fraction_non_alphanumeric': 0.24108853967037178, 'fraction_numerical': 0.007665772326561901, 'mean_word_length': 4.048355899419729, 'pattern_counts': {'":': 0, '<': 135, '<?xml version=': 0, '>': 133, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2704752', 'n_tokens_mistral': 1123, 'n_tokens_neox': 1001, 'n_words': 199}