<?php
if ($person_self_assessmet_skills) {
    echo '<h3 class="col-sm-10"><a href="javascript:void(0)">Update Self Assessment Skills</a></h3>';
} else {
    echo '<h3 class="col-sm-10"><a href="javascript:void(0)">Add Self Assessment Skills</a></h3>';
}
?>
<div class="col-sm-12" id="Update_Assessment_skill_form">
    <form method="post" action="javascript:void(0)" name="update_self_assesment" 
          onclick="return updatePersonAssessment('<?php echo base_url() . 'update-self-assesment/' . $person_info->person_id; ?>')" >
        <input class="col-sm-12" type="hidden" name="to_address" id="to_address" value="" >
        <div class="col-sm-10 ">
            <select required name="tokenize_placeholder_self_assesment[]" style="width: 280px;padding: 8px;" id="tokenize_placeholder" 
                    data-errormessage-value-missing="Self  Assesment field  is Required!"
                    class="tokenize-sample validate[]" 
                    title="" 
                    multiple="multiple" style="margin: 0px; padding: 0px; border: 0px; display: none;" >
                        <?php
                        foreach ($person_self_assessmet_skills as $s_value) {                             
                            ?>
                    <option  selected
                             value="<?php echo $s_value->self_assessment_skills_name; ?>"> 
                                 <?php
                                 echo $s_value->self_assessment_skills_name;
                                 ?>
                    </option>
                <?php } ?>
            </select>
        </div>

        <script type="text/javascript">
            $('select#tokenize_placeholder2').tokenize({placeholder: "Please Type Assessment Skill"});
        </script>
        
        <div class="form-group col-sm-1">
            <?php
            if ($person_self_assessmet_skills) {?>
            <button class="btn btn-success" type="submit">
                <i class="fa fa-save" title="Update self Assesment"></i>
            </button>
            <?php } else{?>
            
            <button class="btn btn-success" type="submit">
                <i class="fa fa-save" title="Add self Assesment"></i>
            </button>
            <?php }?>
        </div>
        <div class="col-sm-1">
            <?php if($person_self_assessmet_skills) {?>
            <a class="btn btn-success">
                <i class="fa fa-times" title="Cancel"></i>
            </a>
            <?php } ?>
        </div>
        <div class="col-sm-12"><br>
            <span id="assesment_error" style="color:red"></span>
        </div>

    </form>
</div>