<!doctype html>
<html lang="en">
  <head>
    <!-- load JS -->
	<script src="js/angular.min.js"></script>
    <!-- end load JS -->
  </head>
  
  <body>
    <div role="tabpanel" class="tab-pane active" id="products">
        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 sign-in-container">
            <div class="
                    <?php if(!$page == "1"){echo "hidden";} ?> 
                    sign-in-box">
                    <h2><strong>重設密碼</strong></h2>
                    
                    
                    	<form id="app4" ng-app="resetform"  ng-controller="Ctrl4" name="resetform" method="post" action="includes/resetpassword.php" novalidate >
                    
                    <div class="controls input-group">
                        <input class="form-control" placeholder="密碼" type="password" name="Cpassword" ng-model="password"  ng-minlength="4" required>
                        
                        <div class="input-group-addon">
                            <span style="color:green"ng-show="resetform.Cpassword.$dirty && resetform.Cpassword.$valid">
                                正確
                            </span>
                        
                            <span style="color:red" ng-show="resetform.Cpassword.$dirty && resetform.Cpassword.$error.minlength">
                                太短
                            </span>
                        </div>
                    </div>
                    
                    <div class="controls input-group">
                        <input class="form-control" placeholder="確認密碼" type="password" name="password" ng-model="Cpassword" ng-minlength="4" required>
                        
                        <div class="input-group-addon">
                            <span ng-show="resetform.password.$dirty">
                                {{password == Cpassword}}
                            </span>
                        </div>
                    </div>  
                    
                    <div class="controls">
                        <input class="btn btn-sign-in" type="submit" name="submit" value="確認" ng-disabled="resetform.$invalid">
                    </div>
                </form>
                        
                        <div class="links-container">
                        <a href="#sign-in" role="tab" data-toggle="tab">登入</a><br>
                        <a href="#sign-up" role="tab" data-toggle="tab">&nbsp;註冊新賬戶</a>
                        </div>

                    </div>
        </div>
    </div>
    
	<script>
    
	 var app4 = angular.module('resetform', []);
    app4.controller('Ctrl4', function($scope) {
    });
	angular.bootstrap(document.getElementById("app4"), ['resetform']);
    </script>
  </body>
</html>