
<%= simple_form_for([:crm,@dining_queue]) do |f| %>
  <%= f.error_notification %>
  <p class="hidden generate_no"><%= @queue_no  %></p>
  <div class="col-md-6">
     <div class="form-inputs">
        <%= f.input :queue_no , :class => "dining",:id => "dining", :readonly => true%>
        <%= f.input :name %>
        <%= f.input :contact_no %>
        <%= f.input :seater %>
        <%= f.input :remark %>
        

      </div>
      <br>
      <div class="form-actions">
        <%= f.button :submit,"Create Queue" %>
      </div>
  </div>
<% end %>


<script type="text/javascript">
$(document).ready(function(){
	if($('form').attr('id') == "new_dining_queue"){
    	var queue_no = $('.generate_no').text();
    	$('#dining_queue_queue_no').val(queue_no);
    }
});
</script>
