<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
 <?php
            $this->load->view('user/common_style');
 ?>
<link rel="stylesheet" href="<?php echo base_url();?>styles/fonts/Socialico/stylesheet.css">
<link rel="stylesheet" href="<?php echo base_url();?>styles/css/set1.css">
  <script src="<?php echo base_url();?>styles/js/modernizr.js"></script>
 <style>
  .contact_one .contact_left_content form input[type="text"]{border:0px;}
  .prfledit label, .prfledit label {
  padding-top: 10px;
}

.help-block {
    color: #eb5055;
    margin: 0em 0em 0em !important;
}
p.frgtpwd {

text-transform: none;
  }
  .profilesub ul li label{
  display: inline;
  color: #eb5055;
}
  </style>
        
</head>
<body>
<div id="preloader">
            <div class="preloader_spinner"> </div>
        </div>  
         
           <?php
                $this->load->view('user/header');
                $this->load->view('user/login_header');
                // $this->load->view('user/profileboard');

            ?>           
  
    <?php 
      $us_data = userMinPass();
    ?> 
    <div class="col-lg-9 col-md-9 col-sm-12 col-xs-12">
      <div class="table-list clearfix">
      <form class="steps-validation change_pwd" method="post" action="<?php echo base_url();?>changepwd">
                <div class="profilesub clearfix profilesub2">
                    	<h4 class="other-title theme-color"><?php echo $this->lang->line('change_pwd_title'); ?> <span><?php echo $this->lang->line('change_pwd_sub'); ?></span></h4>
                        <?php if($this->session->flashdata('success_message')) {?>
                             <div class="row"><div class="col-lg-12 ">     <p class="frgtpwd frgtpwd1"><i class="fa fa-thumbs-up"></i><?php echo $this->session->flashdata('success_message');?></p></div></div>
                              <?php } elseif ($this->session->flashdata('error_message')) { ?>
                                <div class="row"><div class="col-lg-12">  <p class="frgtpwd frgtpwd1 frgtpwdred"><i class="fa fa-thumbs-down"></i><?php echo $this->session->flashdata('error_message');?></p></div></div>
                              <?php } else { }?>
                        	 
                              <div class="col-lg-12 mt-10">
                                <label class="col-lg-3 other-title theme-color mt-15"><?php echo $this->lang->line('change_pwd_lbl'); ?> * </label>
                                  <div class="col-lg-9">
                                      <input name="current" class="" type="password" id="" value="" />
                                    <label class="control-error" style="color:#f00 !important"><?php echo form_error('authenticate');?></label> 
                                  </div>
                              </div> 
                              

                                <div class="col-lg-12 mt-10">
                                <label class="col-lg-3 other-title theme-color mt-15"><?php echo $this->lang->line('change_pwd_new_lbl'); ?> * </label>
                                  <div class="col-lg-9">
                                      <input name="newpwd" class="" type="password" id="" value="" />
                                    <label class="control-error" style="color:#f00 !important"><?php echo form_error('authenticate');?></label> 
                                  </div>
                              </div>     

                               <div class="col-lg-12 mt-10">
                                <label class="col-lg-3 other-title theme-color mt-15"><?php echo $this->lang->line('change_con_new_lbl'); ?> * </label>
                                  <div class="col-lg-9">
                                      <input name="confirm" class="" type="password" id="" value="" />
                                      <label class="control-error" style="color:#f00 !important"><?php echo form_error('authenticate');?></label> 
                                  </div>
                              </div>      
   				</div>
               <div class="cmmn col-lg-12">   <div class="contact_page_btn">
             
                                        <button class="yellow-btn" type="submit"><?php echo $this->lang->line('contact_submit'); ?></button>
                                    </div></div>
            </div>
            </form>
            <?php
                // $this->load->view('user/shortlinks');
            ?>
            
        </div>
    </div>
    </div>
    </div>
  
  
 
  <?php
                $this->load->view('user/footer');
            ?>
<!-- </section> -->



<script src="<?php echo base_url();?>styles/js/jquery-1.12.2.min.js"></script>
<!-- <script src="<?php echo base_url();?>styles/js/bootstrap.min.js"></script> -->
<!-- Bootsrap form validation JS files -->
        <script type="text/javascript" src="<?php echo base_url();?>assets/js/formValidation.js"></script>
        <script type="text/javascript" src="<?php echo base_url();?>assets/js/bootstrap.js"></script>
        
         <script src="<?php echo base_url();?>/assets/boots/js/select_min.js"></script>
    
       <link rel="stylesheet" type="text/css" href="<?php echo base_url();?>/assets/boots/css/select2.css">


<script>
			(function() {

         $('.change_pwd').formValidation({
                    framework: 'bootstrap',
                    excluded: [':disabled'],
                    
                    fields: {
                       
                        <?php if(isset($us_data)) { ?>
                        newpwd: {
                            validators: {
                                notEmpty: {
                                    message: '<?php echo $this->lang->line("user_password_empty");?>'
                                },
                                stringLength: {
                                min: <?php echo $us_data;?>,
                                message: '<?php echo $this->lang->line("user_password_limit");?><?php echo $us_data;?>'
                                }

                            }
                        },
                        confirm: {
                            validators: {
                                notEmpty: {
                                    message: '<?php echo $this->lang->line("user_confirmpassword_empty");?>'
                                },
                                stringLength: {
                                min: <?php echo $us_data;?>,
                                message: '<?php echo $this->lang->line("user_confirmpassword_limit");?><?php echo $us_data;?>',
                                },
                                identical: {
                                    field: "newpwd",
                                    message: '<?php echo $this->lang->line("user_confirmpassword_match");?>'
                                }

                            }
                        },
                         <?php } else { ?>

                        newpwd: {
                            validators: {
                                notEmpty: {
                                    message: '<?php echo $this->lang->line("user_password_empty");?>'
                                }

                            }
                        },
                        confirm: {
                            validators: {
                                notEmpty: {
                                    message: '<?php echo $this->lang->line("user_confirmpassword_empty");?>'
                                },
                                identical: {
                                    field: "newpwd",
                                    message: '<?php echo $this->lang->line("user_confirmpassword_match");?>'
                                }

                            }
                        },
                        <?php } ?>
                         current: {
                            validators: {
                                notEmpty: {
                                    message: '<?php echo $this->lang->line("user_password_empty");?>'
                                },
                                remote: {
                                    url: function(validator, $field, value) {
                                        
                                        return '<?php echo base_url();?>user/profile/validpassword';
                                    },
                                    type: 'POST',
                                    delay: 1000,
                                    message: '<?php echo $this->lang->line("change_invalid_passwd"); ?>'
                                }

                            }
                        }
                       
                }
                })
               
				// trim polyfill : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim
				if (!String.prototype.trim) {
					(function() {
						// Make sure we trim BOM and NBSP
						var rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
						String.prototype.trim = function() {
							return this.replace(rtrim, '');
						};
					})();
				}

				[].slice.call( document.querySelectorAll( 'input.input__field' ) ).forEach( function( inputEl ) {
					// in case the input is already filled..
					if( inputEl.value.trim() !== '' ) {
						classie.add( inputEl.parentNode, 'input--filled' );
					}

					// events:
					inputEl.addEventListener( 'focus', onInputFocus );
					inputEl.addEventListener( 'blur', onInputBlur );
				} );

				function onInputFocus( ev ) {
					classie.add( ev.target.parentNode, 'input--filled' );
				}

				function onInputBlur( ev ) {
					if( ev.target.value.trim() === '' ) {
						classie.remove( ev.target.parentNode, 'input--filled' );
					}
				}
			})();
		</script>
    </script>
<script src="<?php echo base_url();?>styles/js/main.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>styles/js/owl.carousel.min.js"></script>
 <script src="<?php echo base_url();?>styles/js/classie.js"></script>
<script type="text/javascript">
	$(document).ready(function($) {
	$("#owl-example").owlCarousel({   
	 nav:true,
	 
	 items : 8, 
    itemsCustom : false,
    itemsDesktop : [1199,8],
    itemsDesktopSmall : [980,5],
    itemsTablet: [768,5],
    itemsTabletSmall: [768,4],
    itemsMobile : [479,2],
    singleItem : false,
    itemsScaleUp : true,
	    navigation : true,
    navigationText : ["",""],
    rewindNav : true,
    scrollPerPage : false,
	});
	});
	 
 
	
	</script>
    <?php  $this->load->view('user/common_script');?>

</body>
</html>
