<div class="modal fade" id="createEmergencyContact" 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">Emergency Contacts</h4>
        </div>
        <div class="modal-body" >
            <form id="certification" method="post" action="{{ route('emergency.store') }}" enctype="multipart/form-data" class="form-inline" style="padding-top:10px;"> 
            {{ csrf_field() }}
            <div class=row style="padding:0px 5px 5px 10px;">                
              <div class=form-group style="padding-left:20px;width=20%">     
              <p>Name<span>*</span></p>	
                  <input name="name" type="text" class="form-control" id="name" 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=20%">     
              <p>Phone No. <span>*</span></p>	
                  <input name="phone_no" type="text"  class="form-control" id="phone_no" 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>           
            <div class=row style="padding:0px 5px 5px 10px;"> 
            <div class=form-group style="padding-left:20px;width=20%">     
              <p>Email <span>*</span></p>	
                  <input name="email" type="email" class="form-control" id="email" 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%;height:80px;" >     
              <p>Relation<span>*</span></p>	
              <select class="form-control" name="relation" onchange="relationfieldVisibility(this);"style="width:15em">
                <option value="partner">Partner</option>
                <option value="husband">Husband</option>
                <option value="wife">Wife</option>
                <option value="parent">Parent</option>
                <option value="sibling">Sibling</option>
                <option value="friend">Friend</option>
                <option value="relative">Relative</option>
                <option value="other">Other</option>
              </select>
            </div>
            </div>                 

            </form> 
        </div>
        <div class="modal-footer">
        <button type="button" onclick="cert_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 cert_submit() {
  document.getElementById("certification").submit();
 }
</script>
  

 