
<?php
/* @var $this SiteController */
/* @var $model LoginForm */
/* @var $form CActiveForm  */
$this->pageTitle = Yii::app()->name . ' - Login';
$this->breadcrumbs = array(
    'Login',
);
?>
<?php
$form = $this->beginWidget('CActiveForm', array(
    'id' => 'login-form',
    'enableClientValidation' => true,
    'enableAjaxValidation' => true,
    'clientOptions' => array(
        'validateOnSubmit' => true,
    ),
    'htmlOptions' => array('class' => '')
        ));
?>
<div class="user">
                <!-- <label>User Name </label> -->
                <?php echo $form->textField($model, 'username', array('value' => '', 'class' => 'form-control input username', 'placeholder' => "",'autocomplete'=>'off')); ?>
                
</div>
<div class="pass">
<!--                     <label>Password</label> -->
                   <?php echo $form->passwordField($model, 'password', array('value' => '', 'class' => 'form-control input password', 'placeholder' => "",'autocomplete'=>'off')); ?>  
                   
               </div>
                   <div class="row">
                    <div class="col-xs-12">
                        <a href="https://asia-latinamerica-mea.yamaha.com/en/privacy_policy/index.html" target="_blank" class="fp" style="color: blue;">Link to privacy policy details</a>
                        <br>
                        <span><b><input type="checkbox"  id="policy" placeholder="Agree" onclick="myFunction()"> I agree that the use of the information I provide to Yamaha will be governed by the terms of Yamaha's Privacy Policy and the website's Terms of Use, which I have read and understand.</b></span><br> 
                    </div>
                    <div class="col-xs-12" style="display: none;" id="form_login">
                        <?php echo CHtml::submitButton('Login', array('class' => 'btn-info btn pull-right')); ?>
                       </div>
                   </div>
<?php $this->endWidget(); ?>

 <script>
 $(document).ready(function() {
        $(".disableEvent").on("contextmenu",function(){
             alert('This function is not allowed here.');
           return false;
        }); 
    });

document.onkeydown = function (event) {
    //alert(event.keyCode);
   if(event.keyCode==123)
    {
        return false;
    }
    else if(event.ctrlKey && event.shiftKey && event.keyCode==73)
    {
        return false;  //Prevent from ctrl+shift+i
    }
    else if(event.ctrlKey && event.keyCode==85)
    {
        return false;  //Prevent from ctrl+shift+i
    }
}

document.onkeypress = function (event) {
    //alert(event.keyCode);
   if(event.keyCode==123)
    {
        return false;
    }
    else if(event.ctrlKey && event.shiftKey && event.keyCode==73)
    {
        return false;  //Prevent from ctrl+shift+i
    }
    else if(event.ctrlKey && event.keyCode==85)
    {
        return false;  //Prevent from ctrl+shift+i
    }
}

document.onmousedown = function (event) {
    //alert(event.keyCode);
   if(event.keyCode==123)
    {
        return false;
    }
    else if(event.ctrlKey && event.shiftKey && event.keyCode==73)
    {
        return false;  //Prevent from ctrl+shift+i
    }
    else if(event.ctrlKey && event.keyCode==85)
    {
        return false;  //Prevent from ctrl+shift+i
    }
}

  $('#login-form').on("keyup keypress", function(e) {
  var code = e.keyCode || e.which; 
  if (code  == 13) {            
    e.preventDefault();
    return false;
  }
});


</script>