<section class="row" ng-controller="PasswordController">
  <h3 class="col-md-12 text-center">Reset your password</h3>
  <div class="col-xs-offset-2 col-xs-8 col-md-offset-4 col-md-4">
    <form name="resetPasswordForm" ng-submit="resetUserPassword(resetPasswordForm.$valid)" class="signin form-horizontal" novalidate autocomplete="off">
      <fieldset>
        <div class="form-group" show-errors>
          <label for="newPassword">New Password</label>
          <input type="password" id="newPassword" name="newPassword" class="form-control" ng-model="passwordDetails.newPassword" placeholder="New Password" autocomplete="new-password" popover="{{popoverMsg}}" popover-trigger="focus" popover-placement="top" password-validator required>
          <div ng-messages="resetPasswordForm.newPassword.$error" role="alert">
            <p class="help-block error-text" ng-message="required">Enter a new password.</p>
            <div ng-repeat="passwordError in passwordErrors">
              <p class="help-block error-text" ng-show="resetPasswordForm.newPassword.$error.requirements">{{passwordError}}</p>
            </div>
          </div>
        </div>
        <div class="form-group" show-errors>
          <label for="verifyPassword">Verify Password</label>
          <input type="password" id="verifyPassword" name="verifyPassword" class="form-control" ng-model="passwordDetails.verifyPassword" placeholder="Verify Password" password-verify="passwordDetails.newPassword" required>
          <div ng-messages="resetPasswordForm.verifyPassword.$error" role="alert">
            <p class="help-block error-text" ng-message="required">Enter the password again to verify.</p>
            <p class="help-block error-text" ng-show=resetPasswordForm.verifyPassword.$error.passwordVerify>Passwords do not match.</p>
          </div>
        </div>
        <div class="form-group" ng-show="!resetPasswordForm.newPassword.$error.required">
          <label>Password Requirements</label>
          <progressbar value="requirementsProgress" type="{{requirementsColor}}"><span style="color:white; white-space:nowrap;">{{requirementsProgress}}%</span></progressbar>
        </div>
        <div class="text-center form-group">
          <button type="submit" class="btn btn-primary">Update Password</button>
        </div>
        <div ng-show="error" class="text-center text-danger">
          <strong ng-bind="error"></strong>
        </div>
        <div ng-show="success" class="text-center text-success">
          <strong ng-bind="success"></strong>
        </div>
      </fieldset>
    </form>
  </div>
</section>
