<div class="modal fade" id="createRole" role="dialog">
    <div class="modal-dialog">
    
      <!-- Modal content-->
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal">&times;</button>
          <h4 class="modal-title">Roles</h4>
        </div>
        <div class="modal-body">
            <form id="employmentstatus_form" method="post" action="{{ route('roles.store') }}" enctype="multipart/form-data" class="form-inline" style="padding-top:10px;"> 
            {{ csrf_field() }}
                <div class=form-group style="padding-left:20px;width=30%">     
                    <p>Role Code<span>*</span></p>	
                    <input name="role_code" type="text" class="form-control" id="role_code" style="border-radius: 0px 5px 5px 0px;border: 1px solid #eee;margin-bottom: 15px;width: 15em;height: 30px;float: left;padding: 0px 15px;"
                    required>
                </div>
                <div class=form-group style="padding-left:20px;width=30%">     
                    <p>Employment status<span>*</span></p>	
                    <select name="employmentstatus_code" id="employmentstatus_code" class="form-control selectpicker" data-live-search="true" data-size="5"  title="Select Pay Grade" style="width:15em;" onfocus='this.size=5;' onblur='this.size=1;' onchange='this.size=1; this.blur();'>
                      @foreach($status_codes as $status_code)
                        <option value="{{ $status_code->employment_status_code }}">{{ $status_code->employment_status }}</option>
                      @endforeach
                    </select>
                </div> 
                <div class=form-group style="padding-left:20px;width=30%">     
                    <p>Role<span>*</span></p>	
                    <input name="role" type="text" class="form-control" id="role" style="border-radius: 0px 5px 5px 0px;border: 1px solid #eee;margin-bottom: 15px;width: 15em;height: 30px;float: left;padding: 0px 15px;"
                    required>
                </div>
                <div class=form-group style="padding-left:20px;width=30%">     
                    <p>Description</p>	
                    <textarea name="description" cols="30" row="2"></textarea>
                </div>
            </form> 
        </div>
        <div class="modal-footer">
            <button type="button" onclick="form_submit()" class="btn btn-primary">Save </button>
            <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        </div>
      </div>
      
    </div>
</div>
<script type="text/javascript">
function form_submit() {
  document.getElementById("employmentstatus_form").submit();
 }
</script>
  