<div class="col-sm-8">
    <div class="row gray"> 
        <div class="col-sm-12">
            <div class="col-sm-12">
                <div class="col-sm-12"><h3 style="text-align: center !important; color: ">Invite Learner</h3></div>      
            </div>  
            <div class="col-sm-12"></div>
            <div class="col-sm-12">
               <?php //$this->cf->dd($video_course); ?>
                <?php
                $url = 'send-video-course-invitation/' . $video_course->url;
                echo form_open_multipart($url, 'class="" id="formID2" name="inviteForm"');
                ?>
                
        <!-- ---------Send Invitation Type Start---------- -->   
                <div class="form-group col-sm-12 padding-zero text-left">
                    <div class="form-group col-sm-1 text-left" style="margin-top: 10px"><label>Type: </label></div>
                    <div class="form-group radio radio-success col-sm-7">
                        <input  type="radio" 
                                name="send_invitation_type" 
                                id="anonymous"
                                onclick="getSendInvitationType(this.value)"
                                value="1" 
                                <?php 
                                    echo set_value('send_invitation_type') == 1 ? "checked" : ""; 
                                ?>
                                >
                        <label for="anonymous">Anonymous</label>
                        <span style="margin-right: 30px"></span>
                        <input  type="radio" 
                                name="send_invitation_type" 
                                id="tt" 
                                onclick="getSendInvitationType(this.value)"
                                value="2"
                                <?php 
                                    echo set_value('send_invitation_type') == 2 ? "checked" : ""; 
                                ?>
                                >
                        <label for="tt">TT</label>
                        <span style="margin-right: 30px"></span>
                        <input  type="radio" 
                                name="send_invitation_type" 
                                id="individuals" 
                                onclick="getSendInvitationType(this.value)"
                                value="3"
                                <?php 
                                    echo set_value('send_invitation_type') == 3 ? "checked" : ""; 
                                ?>
                                >
                        <label for="individuals">Individuals</label>
                        <span style="margin-right: 30px"></span>
                        <input  type="radio" 
                                name="send_invitation_type" 
                                id="groups" 
                                onclick="getSendInvitationType(this.value)"
                                value="4"
                                <?php 
                                    echo set_value('send_invitation_type') == 4 ? "checked" : ""; 
                                ?>
                                >
                        <label for="groups">Groups</label>
                    </div>
                </div>
                <span style="color: red;" id="send_invitation_type_error"><?php echo form_error('send_invitation_type')?></span>
        <!-- ---------Send Invitation Type End---------- -->  
                
        <!-- ---------Send Invitation To User Start---------- -->
                <div id="invite_user" style="
                    <?php 
                        if(set_value('send_invitation_type') == 2 || set_value('send_invitation_type') == 3 || set_value('send_invitation_type') == 4){ 
                    ?>
                     display: block;
                        <?php }else{ ?>
                     display: none;
                        <?php } ?>
                     ">
                    <div class="form-group col-sm-10">
                        <label for="invitation_send_to_user">To: </label>
                        <div class="input-group">
                            <input type="text" 
                                   class="form-control"
                                   id="invitation_send_to_user"
                                   name="invitation_send_to_user"
                                   value="<?php echo set_value('invitation_send_to_user');?>"
                                   placeholder="Please type the number of user">
                            <span class="input-group-addon"><i class="fa fa-user"></i></span>
                        </div>
                        <span style="color: red;" id="invitation_send_to_user_error"><?php echo form_error('invitation_send_to_user')?></span>
                    </div>
                </div>
        <!-- ---------Send Invitation To User End---------- -->
        
        <!-- ---------Send Invitation To anonymous Start---------- -->    
                <div id="invite_anonymous" style="
                     <?php 
                        if(set_value('send_invitation_type') == 1){ 
                    ?>
                     display: block;
                        <?php }else{ ?>
                     display: none;
                        <?php } ?>
                     ">
                    <div class="form-group col-sm-12">
                        <div class="form-group col-sm-12 padding-zero">
                            <div class="col-sm-10 padding-zero text-left">
                                <label for="invitation_send_to_anonymous">To: </label>
                                <textarea type="text" oninput="checkEmail(this.value)" class="form-control" id="invitation_send_to_anonymous" name="invitation_send_to_anonymous" value="" placeholder="Separate multiple email addresses with a comma (,)"><?php echo set_value('invitation_send_to_anonymous');?></textarea>
                            </div>  
                        </div>   
                        <span style="color: red;" id="invitation_send_to_anonymous_error"><?php echo form_error('invitation_send_to_anonymous')?></span>
                    </div>
                </div>
        <!-- ---------Send Invitation To anonymous End---------- --> 
        
        <!-- ---------Send Invitation Message Start---------- -->   
                <div class="col-sm-12 form-group">                   
                    <div class="form-group col-sm-12 padding-zero">
                        <div class="col-sm-10 padding-zero text-left">
                            <label for="invitation_message">Invitation Message:</label>
                            <textarea class="form-control" type="text" rows="7" cols="65" name="invitation_message" id="invitation_message" placeholder="Hi,I would like you to enroll in my online video course on TalhaTraining.Regards, #Teacher Name" value=""></textarea>
                        </div>
                    </div> 
                    <span style="color: red;" id="invitation_message_error"><?php echo form_error('invitation_message')?></span>
                </div>  
        <!-- ---------Send Invitation Message End---------- -->  
        
        <!-- ---------Send Invitation Preview Email Button Start---------- -->   
                <div class="col-sm-12 form-group"><br> 
                    <div class="col-sm-2 col-sm-offset-9">
                        <button type="button" class="col-sm-1 btn green-btn btn-small preview" value="Preview" onclick="email_preview();">
                            <i class="fa fa-envelope-o" title="preview"></i></button>
                    </div>
                    <br><br> 
                </div>
        <!-- ---------Send Invitation Preview Email Button End---------- -->

        <!-- ---------Email Preview View start-------------------------- -->
                <div class="col-sm-12" id="email_preview" >
                    <div class="col-sm-12">
                        <div id="dvEmailPreview" style="display: none">
                            <div class="full text-left top20">
                                <center><label class="fnt12">Email Preview</label></center>
                            </div>

                            <div class="fleft tbl_responsive top10" id="emailPreview">
                                <div id="dvEmailTemplate">
                                    <div class="col-md-12 col-sm-12">
                                        <div class="email-preview" style="background: white; border: 1px solid #cad4e7;border-radius: 2px;padding:20px;">
                                            <div class="inner-email" style="border: solid 1px #cad4e7;padding:15px;">
                                                <a href="" style="display: block;border-bottom: 1px solid #dddddd;"><img src="<?php echo base_url() . '/image/logo.png' ?>" alt=""> &nbsp;  Talha Training</a>
                                                <p>Hello,</p>
                                                <p id="inv_msg"></p>
                                                <center><p>Click below link to view Course Details <br>
                                                        <p><a href="<?php echo base_url().'view-single-video-course/' . $video_course->url; ?>" target="_blank"><button type="button" style="background-color: #a70b0c;border: medium none;border-radius: 5px;color: #fff;">View Video Course</button></a></p>
<!--                                                <a href="<?php //echo base_url().'view-single-video-course/'. $video_course->url; ?>" target="_blank"><?php //echo $video_course->url; ?></a>-->
                                                </p></center>
                                                <p>Thank You.</p>
                                                <p>Sincerely, <br>
                                                TalhaTraining</p>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                
        <!-- ---------Email Preview View End---------------------------- -->
                <input id="video_course_num" name="video_course_num" value="45" type="hidden">
                <div class="col-md-12"><br></div>
                <div class="col-sm-2"></div>
                
                <div class="col-sm-3">
                    <a href="<?php echo base_url(). 'edit-admin-video-course/'. $video_course->video_course_id ?>" class="green-btn btn btn-default edit_course" title="Edit Course"><i class="fa fa-pencil-square-o"></i></a>
                </div>           
                <div class="col-sm-2">
                    <button type="submit" class="green-btn btn btn-default invite" title="Invite"><i class="fa fa-paper-plane"></i></button>
                </div>
                <div class="col-sm-2">
                    <a href="<?php echo base_url(). 'manage-admin-video-course' ?>" class="green-btn btn btn-default skip" title="Skip"><i class="fa fa-arrow-circle-right"></i></a>
                </div>
                <?php echo form_close(); ?>
            </div>  
        </div>   
    </div>
</div>
<script src="<?php echo base_url();?>back_end_resource/send_video_course_invitation/send_video_course_invitation.js" type="text/javascript"></script>
<link href="<?php echo base_url();?>back_end_resource/send_video_course_invitation/send_video_course_invitation.css" rel="stylesheet" type="text/css"/>
