<!-- <div class="span12">
	<div class="page-header">
	 <ul class="breadcrumb">
	   	<li><a href="<%= root_path %>">Home</a></li>
			<li><a href="<%= settings_products_path %>">Products</a></li>
	  	<li>New</li>
	 </ul>
	</div>
    <%= render 'form', settings_product: @settings_product %>
</div> -->
<div class="page-header">
  <ol class="breadcrumb">
    <li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
    <li class="breadcrumb-item"><a href="<%= settings_products_path %>"><%= t("views.right_panel.detail.product") %></a></li>
    <li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
    <span class="float-right">
      <%= link_to t('.back', :default => t("views.btn.back")), settings_products_path %>
    </span>
  </ol>
</div>
<br>
<%= render 'form', settings_product: @settings_product %>
<script>
	function randomNumber(len) {
			var sValidCharacters = "01234ABCDEFGHIJabcdefghijk56789lmnKLMNOPQRSTUVWXYZopqrstuvwxyz";
			var sCharCode = "";

			for (i = 1; i <= len; i++) {
			    sCharCode = sCharCode + sValidCharacters.charAt(parseInt(Math.random() * sValidCharacters.length));
					if ((i === 4) || (i === 8)) {
        		sCharCode = sCharCode + "-";
    			}
				}
					return sCharCode;
			}
document.getElementById("item_code").value = randomNumber(12);
</script>
