<input type="hidden" id="baseUrl" value="<?php echo base_url(); ?>">
<div class="col-sm-8">
    <div class="row ">
        <div class="col-sm-12 " >
            <div class="col-sm-12">
                <h3>Create Certificate for 
                    <?php echo $certificate_type ?>
                    <?php echo '<span class="text-success">' . $course_info->course_name . '</span>' ?>
                </h3>                
                <hr>

                <nav class="text-justify">
                    <center>
                        <div class="col-sm-12">
                            <span class="clo-sm-3" title="Course Profile" style="padding: 0">
                                <span class="number badge" style="background-color: green">1</span>
                                <span class="text-left label" style="color: #000;font-size: 14px;font-weight: normal">Certificate Information</span>
                                <span class="nav-arrow" id="cborder" style="margin-right: 2px"><img src="<?php echo base_url(); ?>image/border.jpg"></span>
                            </span>

                            <span class="clo-sm-3" title="Add work Files" style="padding: 0">
                                <span class="number badge" style="background-color: gray;">2</span>
                                <span class="text-left label" style="color: #000;font-size: 14px;font-weight: normal;padding: 0">Certificate Demo</span>
                            </span>
                        </div>
                    </center>
                </nav>

                <div class="col-sm-12"><br></div>

            </div>

            <div class="col-sm-12 " >

                <div class="col-sm-12 gray_ttc" >                    
                    <div class="col-sm-12" ><br></div>
                    <!--<form id="formID2" action="" method="post" name="certificateForm" enctype="multipart/form-data" >-->
                    <?php echo form_open_multipart('admin/save-course-certificate', 'id="createCertificate"'); ?>
                    <div class="form-group col-sm-6 ">
                        <div class="input-group">
                            <input type="text"
                                   data-errormessage-value-missing="Certificate Name is Required!"
                                   class="form-control validate[required]"
                                   name="certificate_name" id="certificate_name"
                                   value="<?php echo set_value('certificate_name'); ?>"
                                   placeholder="Please Type Certificate name.."
                                   aria-describedby="basic-addon1">
                            <span class="input-group-addon" id="basic-addon1"><i class="fa  fa-adn"></i></span>
                        </div>
                    </div>                       
                    <?php echo form_error('certificate_name', '<div class="col-sm-6 text-danger">', '</div>'); ?>
                    <div class="form-group col-sm-12" ><br></div>
                    <div class="form-group col-sm-6 ">                            
                        <input type="file"
                               name="certificate_logo"
                               data-errormessage-value-missing="Logo Image Required"
                               class="filestyle validate[required]" 
                               data-icon="false" 
                               data-placeholder="Logo image (jpg/png/gif, Max-2MB )"
                               onchange="validateCertificateImage(this)">                                               
                    </div>                       
                    <?php echo form_error('certificate_logo', '<div class="col-sm-6 text-danger">', '</div>'); ?>
                    <div class="form-group col-sm-6 ">
                        <?php if (isset($this->session->uploaded_certificate_logo)) { ?>
                            <div id="image" style="float:left;">                            
                                <img id="image_display" src="<?php echo base_url($this->session->uploaded_certificate_logo)?>" style="width:75px;">
                            </div>
                        <?php }else{ ?>

                        <div id="image" style="float:left; display: none;" class="text-danger">                            
                            <img id="image_display" src="#" style="width:75px;">
                        </div>
                        <?php } ?>
                    </div>                                            


                    <div class="form-group col-sm-12" ><br></div>
                    <div class="form-group col-sm-6 ">
                        <select data-errormessage-value-missing="Please select template"
                                class="form-control validate[required]" 
                                name="certificate_template" 
                                id="assignCertificateTo" >
                            <option value=""> - Choose Template - </option>                                
                            <option value="1"<?php echo set_select('certificate_template', '1'); ?>>Default</option>                                                           
                        </select>
                    </div>
                    <?php echo form_error('certificate_template', '<div class="col-sm-6 text-danger">', '</div>'); ?>

                    <div class="form-group col-sm-12" ><br></div>
                    <div class="form-group col-sm-6 text-left">
                        <select data-errormessage-value-missing="Certificate status is Required!"
                                class="form-control validate[required]"  
                                id="certificate_status" 
                                name="certificate_status" >
                            <option value=""> -Select Certificate  Status - </option>
                            <option value="1" <?php echo set_select('certificate_status', '1'); ?>>Published</option>
                            <option value="0" <?php echo set_select('certificate_status', '0'); ?>>UnPublished</option>
                            <option value="2" <?php echo set_select('certificate_status', '2'); ?>>Archived</option>
                        </select>
                    </div>
                    <?php echo form_error('certificate_status', '<div class="col-sm-6 text-danger">', '</div>'); ?>
                    <div class="form-group col-sm-12" ><br></div>

                    <div class="col-sm-4">
                        <input type="submit" class="green-btn btn btn-default" value="Create Certificate"><br/><br/>
                    </div>
                    <div class="col-sm-4"></div>
                    <?php echo form_close(); ?>
                </div>
            </div>
        </div><!-- /.row gray -->
    </div>
</div>
<script src="<?php echo base_url(); ?>back_end_resource/quiz/admin_certificate.js" type="text/javascript"></script>