<script src="https://www.google.com/recaptcha/api.js?"></script>
<script>
    $.noConflict();
</script>
<section class="course-detail" style="min-height: 50%;padding-bottom: 30px !important;">
    <div class="row">           
        <div class="gray col-sm-12">
            <div class="login padding-top-zero">

                <div class="login-inner" style="margin-bottom: 2%;padding: 0">
                    <div class="white-bg row">
                        <?php
                        if ($this->session->userdata('exception')) {
                            echo '<h5 style=color:red>' . $this->session->userdata('exception') . '<h5>';
                            $this->session->unset_userdata('exception');
                        }
                        if ($this->session->userdata('message')) {
                            echo '<h5 style=color:green>' . $this->session->userdata('message') . '</h5>';
                            $this->session->unset_userdata('message');
                        }
                        ?>                        
                        <div class="col-sm-8 col-sm-offset-2">
                            <?php
                            $url = 'forgot-password';
                            echo form_open($url, 'class="" id="formID2" name="" onsubmit="return check_form_bug_report()" ');
                            ?>
                            <div class="input-group">
                                <input type="email" 
                                       name="person_email" 
                                       id="person_email" 
                                       data-errormessage-value-missing="Please Type Your Email Address!"
                                       class="form-control" 
                                       value="<?php echo set_value('person_email'); ?>"
                                       placeholder="Email address or Username" 
                                       oninput="check_exist_forgot_password_email(this.value,'<?php echo base_url();?>check-email' )"
                                       aria-describedby="basic-addon1">
                                <span class="input-group-addon" id="basic-addon1"><i class="fa fa-at"></i></span>
                            </div>
                            <input type="hidden" id="forgot_password_email_hidden" value="">
                            <span id="person_email_message" style="color:red;"><?php echo form_error('person_email'); ?></span>
                            <br/>
                            <div>
                                <div>                                  
                                    <input type="hidden" id="mcap" name="google_captcha" value="">
                                    <?php $this->general_library->google_captcha(); ?>                                   
                                </div>
                                <span id="captcha_error" style="color: red"><?php echo form_error('google_captcha'); ?></span>
                            </div>                  
                            <br/><br/>
                            <input type="submit" class="forgot_password_btn btn btn-default" value="Send Reset Password Link"><br/><br/>

                            <div class="row">
                                TT User?<a href="<?php echo base_url() ?>sign-in"> Sign In</a> | 
                                Not registered yet?  <a href="<?php echo base_url() ?>sign-up">Sign Up</a>
                            </div><br/><br/>

                            <?php echo form_close(); ?>
                        </div>
                    </div><!-- /.row -->
                </div><!-- /.login inner -->
            </div><!-- /.login  -->
        </div><!-- /.gray col-sm-12 -->
    </div><!-- /.row -->
</section><!-- /.course-detail -->
<script>
     function check_form_bug_report(){
         if(grecaptcha.getResponse() == ''){
             $('#mcap').val('');
             $('#captcha_error').html('Fill up the above fields then Complete The Captcha');
             return false;
         }else{
             $('#mcap').val('1');
             return true;
         }
     }
 </script>
<script type="text/javascript" src="<?php echo base_url() ?>front_end_resource/sign_up/sign_up.js"></script>
