<h4 class="bg-primary">Change Password</h4>

<form name="chgPasswordForm" novalidate>
  <div class="form-group">
    <input class="form-control" type="password" name="currentPassword" placeholder="Current password"
           ng-model="dealerInfo.changePassword.old_password" required>
    <p class="help-block"
       ng-show="chgPasswordForm.currentPassword.$dirty && chgPasswordForm.currentPassword.$error.required">This field is
      required.</p>

  </div>

  <div class="form-group">
    <input class="form-control" type="password" name="newPassword" placeholder="New password"
           ng-model="dealerInfo.changePassword.new_password" unique="dealerInfo.changePassword.old_password" required>
    <p class="help-block" ng-show="chgPasswordForm.newPassword.$dirty && chgPasswordForm.newPassword.$error.unique">This
      password must be different than your current one.</p>
    <p class="help-block" ng-show="chgPasswordForm.newPassword.$dirty && chgPasswordForm.newPassword.$error.required">
      This field is required.</p>
  </div>

  <div class="form-group">
    <input class="form-control" type="password" name="confirmedPassword" placeholder="Confirm new password"
           ng-model="confirmedPassword" match="dealerInfo.changePassword.new_password" required>
    <p class="help-block"
       ng-show="chgPasswordForm.confirmedPassword.$dirty && chgPasswordForm.confirmedPassword.$error.match">Your
      passwords must match.</p>
    <p class="help-block"
       ng-show="chgPasswordForm.confirmedPassword.$dirty && chgPasswordForm.confirmedPassword.$error.required">This
      field is required.</p>
  </div>


</form>


<button class="btn btn-primary" ng-disabled="chgPasswordForm.$invalid" ng-click="save()">Save</button>
<a ui-sref="dealer-account-settings.main" class="btn btn-danger">Cancel</a>

