<?php
if ($interest_field_info_all) {
    echo '<h3 class="col-sm-10"><a href="#">Update Interest Field</a></h3>';
} else {
    echo '<h3 class="col-sm-10"><a href="#">Add Interest Field</a></h3>';
}
?>
<div class="col-sm-12">
    <form method="post" action="javascript:void(0)" name="update_interest" 
          onclick="updatePersonInterest('<?php echo base_url() . 'super_admin_profile/update_interest_field/' . $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_interest[]" style="width: 280px;padding: 8px;" id="tokenize_placeholder" 
                    data-errormessage-value-missing="Person Interest field  is Required!"
                    class="tokenize-sample validate[]" 
                    title="" 
                    multiple="multiple" style="margin: 0px; padding: 0px; border: 0px; display: none;" >
                        <?php
                        foreach ($interest_field_info_all as $s_value) {
                            ?>
                    <option  selected
                             value="<?php echo $s_value->field_of_interest_name; ?>"> 
                                 <?php
                                 echo $s_value->field_of_interest_name;
                                 ?>
                    </option>
                <?php } ?>
            </select>
        </div>

        <div class="form-group col-sm-1">
<!--            <input type="button" 
            <?php
            // if ($interest_field_info_all) {
            //    echo 'value="Update Interest"';
            //  } else {
            //     echo 'value="Add Interest"';
            // }
            ?>
                   class="green-btn btn btn-default" 
                   >-->



            <?php if ($interest_field_info_all) { ?>
                <button class="btn btn-success" type="submit">
                    <i class="fa fa-save" title="Update Interest"></i>
                </button>
            <?php } else { ?>

                <button class="btn btn-success" type="submit">
                    <i class="fa fa-save" title="Add Interest"></i>
                </button>
            <?php } ?>

        </div>
    </form>
    <div class="col-sm-1">
        <a class="btn btn-success" id="cancelUpdateinterest">
            <i class="fa fa-times" title="Cancel"></i>
        </a>
    </div>

    <div class="col-sm-12"><br>
        <span id="interest_error" style="color: red"></span>
    </div>
</div>