<br>
<%= simple_form_for @in_duty, :url => origami_index_in_duty_path, :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 form-group">
      <%= 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'} %>
      <br/>
      
     <!-- <%= f.input :in_time, :placeholder => "From Date", :class => "form-control datetimepicker" %>
     <%= f.input :out_time, :placeholder => "To Date", :class => "form-control datetimepicker" %>-->
     
     <div class="form-group">
      <label class="font-14">* In Time</label>
      <div class="input-group">
        <span class="input-group-addon">
          <i class="material-icons">date_range</i>
        </span>
        <% if !@in_duty.in_time.nil?%>
        <input type="text" name="in_duty[in_time]" value="<%= @in_duty.in_time.strftime('%A, %d-%m-%Y') %>" class="datepicker form-control col-md-12" placeholder="Start Date...">
        <% else %>
        <input type="text" name="in_duty[in_time]" class="datetimepicker form-control col-md-12" placeholder="In Time...">
        <% end %>
      </div>
    </div>
    <div class="form-group">
      <label>* Out Time</label>
      <div class="input-group">
        <span class="input-group-addon">
          <i class="material-icons">date_range</i>
        </span>
        <% if !@in_duty.out_time.nil?%>
        <input type="text" name="in_duty[out_time]" value="<%= @in_duty.out_time.strftime('%A, %d-%m-%Y') %>" class="datepicker form-control col-md-12" placeholder="Start Date...">
        <% else %>
        <input type="text" name="in_duty[out_time]" class="datetimepicker form-control col-md-12" placeholder="Out Time...">
        <% end %>
      </div>
    </div>
  </div><br>

  <div class="form-group">
    <% f.button :submit, "Create", :class => 'btn bg-blue ', :id => 'create' %>
    <% f.button :submit, "Update", :class => 'btn bg-blue ', :disabled => '', :id => 'update' %>
    <% f.button :button, "Reset", :class => 'btn bg-danger ', :id => 'reset' %>
  </div>
  <div class="form-actions">
    <%= f.submit "Create In Duty", :class => 'btn bg-blue' %>
  </div>
</div>
</div>


<% end %>


<script type="text/javascript">

  $(document).ready(function () {
      setHeaderBreadCrumb(_IN_DUTIES_);

  });

</script>
