43 lines
1.5 KiB
Plaintext
43 lines
1.5 KiB
Plaintext
<div class="col-md-3">
|
|
<%= simple_form_for([:settings, @commissioner]) do |f| %>
|
|
<%= f.error_notification %>
|
|
|
|
<div class="form-inputs">
|
|
<%= f.input :name %>
|
|
<%= f.label :emp_id, 'Employee' %>
|
|
<%= f.collection_select :emp_id, Employee.all.order('name asc'), :id, :name, {prompt: 'Select an Employee'}, {class: "form-control"} %>
|
|
<br/>
|
|
<%= f.label :commission_id, 'Commission' %><br/>
|
|
<%= f.select :commission_id, Commission.all.map {|l| [l.menu_item.name, l.id]}, {prompt: 'Select a Product'}, {class: 'form-control'} %>
|
|
<br/>
|
|
<%= f.label :joined_date %><br/>
|
|
<%= f.text_field :joined_date, {class: 'form-control', id: 'joined_date', readonly: true} %><br/>
|
|
<%= f.label :resigned_date %><br/>
|
|
<%= f.text_field :resigned_date, {class: 'form-control', id: 'resigned_date', readonly: true} %><br/>
|
|
<label><%= f.check_box :is_active %> Active </label>
|
|
</div>
|
|
<br/>
|
|
|
|
<div class="form-actions">
|
|
<%= link_to 'Back', settings_commissioners_path, class: 'btn btn-success' %>
|
|
<%= f.button :submit, class: 'btn btn-info' %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function () {
|
|
$('#joined_date').datepicker({
|
|
format: 'yyyy-mm-dd',
|
|
autoclose: true
|
|
});
|
|
|
|
$('#resigned_date').datepicker({
|
|
format: 'yyyy-mm-dd',
|
|
autoclose: true
|
|
});
|
|
});
|
|
|
|
</script>
|