<%= simple_form_for @in_juty, :url => origami_index_in_juty_path(@table.id), :method => :post do |f| %>
  <div class="card">
    <div class="body">
      <span class="patch_method"></span>
      <%= f.error_notification %>
      <%= f.hidden_field :id, :class => "form-control col-md-6 " %>

      <div class="form-inputs">
        <%= f.hidden_field :dinning_id, :value => @table.id, :class => "form-control col-md-4 " %>
        <label>Commissioner Name:</label>
        <%= f.collection_select :commissioner_ids, Commissioner.all, :id, :name, {prompt: 'Select Commissioner'}, {class: 'form-control'} %>
        <%= f.input :in_time, :placeholder => "From Date", :class => "form-control" %>
        <%= f.input :out_time, :placeholder => "To Date", :class => "form-control" %>
      </div><br>

      <div class="form-group">
        <%= f.button :submit, "Create", :class => 'btn btn-primary ', :id => 'create' %>
        <%= f.button :submit, "Update", :class => 'btn btn-primary ', :disabled => '', :id => 'update' %>
        <%= f.button :button, "Reset", :class => 'btn btn-danger ', :id => 'reset' %>

        <button type="button" class="btn btn-inverse pull-right" id='back'> <button type="button" class="btn bg-default btn-block" onclick="window.location.href = "origami_index_in_duty_path(@table.id)"><i class="material-icons">reply</i> Back </button>Back</button>
      </div>
    </div>
  </div>
<% end %>


<script type="text/javascript">

    $(document).ready(function () {
        $('#reset').click(function () {
            location.reload();
            return false;
        });
    });

</script>
