    <div class="content-header">
        <div class="container-fluid">
            <div class="row mb-2">
                <div class="col-sm-6">
                    <div class="img-profile ml-3 mt-3">

                    </div>
                    <h1 class="m-0 text-dark"><?php echo (isset($servicetype)) ? 'Edit Service Type' : 'Add Service Type' ?>
                    </h1>

                </div>
                <div class="col-sm-6">
                    <ol class="breadcrumb float-sm-right">
                        <li class="breadcrumb-item"><a href="<?= base_url(); ?>dashboard/servicetype">Service Type</a></li>
                        <li class="breadcrumb-item active"><?php echo (isset($servicetype)) ? 'Edit Service Type' : 'Add Service Type' ?></li>
                    </ol>
                </div>
            </div>
        </div>
    </div>
    <?php
      if(isset($servicetype)){
        $endpoint = 'updateservicetype';
      }else{
        $endpoint = 'insertservicetype';
      }
    ?>
    <form method="post" id="add_driver" class="card" action="<?php echo base_url().'dashboard/'.$endpoint ?>" enctype="multipart/form-data">
        <section class="content">
            <div class="container-fluid">
                <div class="card-body">

                    <div class="row">
                        <input type="hidden" name="id" id="id" value="<?php echo (isset($servicetype)) ? $servicetype['id'] : '' ?>">
                        
                        <div class="col-sm-6 col-md-12">
                            <label class="form-label">Name<span class="form-required">*</span></label>
                            <div class="form-group">
                                <input type="text" name="name" id="name" class="form-control" placeholder="Title" required value="<?php echo (isset($servicetype)) ? $servicetype['name'] : '' ?>">
                            </div>
                        </div>
              
                        <div class="col-sm-6 col-md-12">
                            <div class="form-group">
                                <label class="form-label">Feature Image</label>
 
                                 <input type="file" name="image" class="form-control" placeholder="Image" accept="image/*"
                                 
                                 <?php if(!isset($servicetype)) { ?>
                                    required
                              
                                 <?php } ?>
                                 > 
                                 <?php if(isset($servicetype) && $servicetype['image'] != "") { ?>
                                 <img class="img-thumbnail" width="100" height="100" src="<?php echo $servicetype['image']; ?>">
                                 <?php } ?>
                            </div>
                        </div>

                    </div>

                </div>

            </div>
        </section>
        <section class="content">
            <div class="container-fluid">
                <div class="card-footer text-right">
                    <button type="submit" id="submit"  class="btn btn-primary"> <?php echo (isset($servicetype)) ? 'Edit Service Type' : 'Add Service Type' ?></button>
                </div>
            </div>
        </section>
    </form>
<script>
    function showRadios() {

$("#teamsSec").hide();
if (document.getElementById('isPro').checked) {
    $("#radiosSec").show();
    $("#specificTeams").prop('checked', false);
    $("#allTeams").prop('checked', true);
} else {
    $("#radiosSec").hide();
}
}

function showTeams() {

if (document.getElementById('specificTeams').checked) {
    $("#teamsSec").show();
} else {
    $("#teamsSec").hide();
}
}

 </script>   