<?php
$form = $this->form;
$form->prepare();
//$form->setAttribute('action', $this->url('indexController', ['action' => 'index']));
$form->setAttribute('method', 'post');
$form->setAttribute('id', 'login-form');
echo $this->form()->openTag($form);
?>
<!-- Modal content-->
<div class="modal-content modal-dialoglogin1 login_form">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h2 class="modal-title"><?php echo $this->translate('Login Detail'); ?></h2>
    </div>
    <div class="modal-body">
        <div class="row" style="padding:0 15px;">

            <div class="col-sm-12 price-one no-padding">

                <div class="col-lg-12 error_msg_class" style="background: #c52d2f none repeat scroll 0 0; color: #fff; padding:5px; display: none;"></div>
                <form id="login_form2" autocomplete="off">
                    <div class="col-sm-7 no-padding" style="border-right:1px solid #ccc; padding-right: 5px !important;">


                        <!--<div class="col-lg-12 no-padding"> <?php echo $this->translate('User Type'); ?>  </div>

                        <?php echo $this->formElement($form->get('user_type_id')); ?>
                        <span class="showerror">
                            <?php //echo $this->formElementErrors($form->get('login_usertype'), ['class' => 'error']); ?>
                        </span>-->

                        <div class="col-lg-12 no-padding"> <?php echo $this->translate('Email/Mobile'); ?>  </div>

                        <?php echo $this->formElement($form->get('username')); ?>
                        <span class="showerror">
                            <?php echo $this->formElementErrors($form->get('username'), ['class' => 'error']); ?>
                        </span>
                        <?php echo $this->formElement($form->get('registration_type')); ?>


                        <div class="col-lg-12 no-padding"><?php echo $this->translate('Password'); ?></div>

                        <?php echo $this->formElement($form->get('password')); ?>
                        <span class="showerror">
                            <?php echo $this->formElementErrors($form->get('password'), ['class' => 'error']); ?>
                        </span>


                        <div class="col-lg-6 login-but pull-right no-padding margin-top-5 right">
                            <?php echo $this->FormElement($form->get('login_form')); ?>

                        </div>
                        <div class="ol-lg-6 no-padding line-height30 login-but  pull-left margin-top-5 white">
                            <a href="<?php echo $this->url('user', ['controller' => 'index', 'action' => 'index']); ?>" class="loginhome btn btn-success">New User?</a>
                        </div>
                        <div class="col-lg-12 forgot-reg">
                            <a href="#" id="forgot_form" class="loginhome"> Forgot password?</a><br />
                        </div>
                        <div align="center" class="col-lg-12 login-devider"> OR</div>
                        <div class="col-lg-12" style="color:#000;"></div>

                        <div class="col-md-6 pull-left" id="renderMe" style="padding:0 !important;" >
                            <a class="btn btn-danger btn-social btn-google-plus" style="background:#c52d2f; color:#fff;">
                                <i class="fa fa-google-plus"></i>Google
                            </a></div>

                        <div class="col-lg-6" style="color:#000;"></div>
                        <div class="col-md-6 pull-right" id="renderMe" align="left" style="padding:0 !important;">
                            <a class="btn btn-danger btn-social btn-google-plus" style="background:#3c55a2; color:#fff;">
                                <i class="fa fa-facebook  fa-1x"></i>

                               Facebook
                            </a>


                        </div>
                        <div class="col-lg-12" style="color:#000;"></div>
                        <div class="spance col-md-6">
                            <script type="in/Login">
                            </script>
                        </div>

                    </div>
                </form>
                <div class="col-sm-5 no-padding right login-rightlink" style="float:right;" align="right">
                    <label class="col-lg-12" style="padding-right:0 !important;">
                        <a href="<?php echo $this->basepath(); ?>/login/index/myaccount" class="loginhome">My Profile </a> </label>
                    <label class="col-lg-12" style="padding-right:0 !important;">
                        <a href="<?php echo $this->basepath(); ?>/login/index/myaccount" class="loginhome">Manage Bookings</a>
                    </label>
                    <label class="col-lg-12" style="border-bottom:1px solid #ccc;"></label>
                    <label class="col-lg-12" style="padding-right:0 !important;">
                        <a href="#" class="loginhome"> View E-Ticket</a></label>
                    <label class="col-lg-12" style="padding-right:0 !important;">
                        <a href="#" class="loginhome"> Cancel Bookings</a></label>
                    <label class="col-lg-12" style="padding-right:0 !important;">
                        <a href="#" class="loginhome">Change Travel Date</a></label>
                    <label class="col-lg-12" style="padding-right:0 !important;">
                        <a href="#" class="loginhome">Check Refund Status</a></label>
                    <label class="col-lg-12" style="padding-right:0 !important;">
                        <a href="#" class="loginhome">View Holiday Booking</a></label>
                    <label class="col-lg-12" style="padding-right:0 !important;">
                        <a href="#" class="loginhome">Make Payment</a></label>



                </div>





            </div>

        </div>

        <div></div>

    </div>


    <div class="modal-footer" style=" padding-top:2px !important;">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
    </div>
</div>


<div class="modal-content modal-dialoglogin2 modal-dialoglogin1 forgot_form" style="display:none;">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h2 class="modal-title">

            Forgot Password

        </h2>
    </div>


    <div class="modal-body">
        <div class="row" style="padding:0 15px;">

            <div class="col-sm-12 plan price-one ">

                <!-- <div class="col-lg-12" style=" background: #c52d2f none repeat scroll 0 0; color: #fff; padding:5px;">
                  <h2>Package-
                                       <span style="font-size:14px;">4 Hours - 40 KM</span>
                                       </h2></div>-->
                <form id="login_form4" novalidate>
                    <div class="col-sm-12">

                        <p class="email_error"></p>
                        <div class="col-lg-12" style="text-align:left;"> Enter your email to Reset Password  </div>

                        <input  type="text" id="email-id" name="login_email" placeholder="Type your email here" class="form-control input-border">


                        <div class="col-lg-12" style="color:#000; text-align:center; margin-top:5px;">

                            <a href="#" class="btn btn-primary back_btn"><i class="fa fa-angle-double-left"></i> Back</a>

                            <input type="button" id="forget-password" value="Submit" onclick="return resetPassword()" class="btn btn-primary">



                        </div>






                    </div>
                </form>
                <div id="myModal" class="modal fade">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                                <h4 class="modal-title">Confirmation</h4>
                            </div>
                            <div class="modal-body">
                                <p>An Confirmation Email has been sent on your account</p>
                                <p class="text-warning"><small></small></p>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-default closeButton" data-dismiss="modal">Close</button>

                            </div>
                        </div>
                    </div>

                </div>


            </div>

        </div>

        <div></div>

    </div>
    <div class="modal-footer" style=" padding-top:2px !important;">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
    </div>
</div>


<?php echo $this->form()->closeTag(); ?>

<div class="modal-content modal-dialoglogin2 modal-dialoglogin1 otp_form" style="display:none;">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h2 class="modal-title">Enter OTP</h2>
    </div>


    <div class="modal-body">
        <div class="row" style="padding:0 15px;">

            <div class="col-sm-12 plan price-one ">
                 <?php  $otpform = $this->otpform ;
                                $otpform->prepare();
                                //$otpform->setAttribute('action', $this->url('normal-user', ['action' => 'confirmotp']));
                                $otpform->setAttribute('id', 'confirm-form');
                                $otpform->setAttribute('method', 'post');
                                echo $this->form()->openTag($otpform);?>

                    <div class="col-sm-12">
                        <div class="row form-group">
                            <div class="resend-otp-msg"></div>
                            <div class="col-lg-12" style="text-align:left;">Enter OTP</div>

                            <?php echo $this->formElement($otpform->get('confirm_otp')); ?>
                        </div>

                        <div class="col-lg-12" style="color:#000; text-align:center; margin-top:5px;">
                        <?php echo $this->FormElement($otpform->get('resend_counter')); ?>
                        <?php echo $this->FormElement($otpform->get('confirm_btn')); ?>
                        <?php echo $this->FormElement($otpform->get('resend_btn')); ?>
                        </div>

                    </div>
                     <?php echo $this->form()->closeTag(); ?>
            </div>

        </div>

        <div></div>

    </div>
    <div class="modal-footer" style=" padding-top:2px !important;">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
    </div>
</div>

<script>
    $(function () {
        // Calling Login Form
        $("#login_form").click(function () {
            $(".login_form").show();
            $(".forgot_form").hide();
            //$(".forgot_login").hide();
            return false;
        });


// Calling forgot Form
        $("#forgot_form").click(function () {
            $(".forgot_form").show();
            //$(".social_login").hide();
            $(".login_form").hide();
            //$(".user_register").hide();
            //$(".header_title").text('Forgot Password');
            return false;
        });

        // Calling Register Form
        //$("#register_form").click(function(){
        //$(".social_login").hide();
        //$(".user_register").show();
        //$(".header_title").text('Register');
        //	$(".forgot_login").hide();
        //return false;
        //});

        // Going back to Social Forms
        $(".back_btn").click(function () {
            $(".forgot_form").hide();
            //$(".user_register").hide();
            $(".login_form").show();
            //$(".forgot_login").hide();
            //$(".header_title").text('Login');
            return false;
        });

    });
</script>
