changeuserpassword.component.html 4.76 KB
<div class="row">
    <!-- main-heading -->
    <div class="col-sm-12 pageHeading">
      <h4>Change User Password</h4>
    </div>
    <!-- main-heading -->
    <!-- container -->
<div class="col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3">
    <div class="container-fluid main-full">
<div class="row">
  <div class="well">
    <div class="row">
      <div class="col-sm-12">
        <h5 class="text-center text-success"><strong>**To change your profile fill all the text fields carefully.</strong></h5>
        <div class="panel-body">
          <!-- form -->
          <form class="form-horizontal" [formGroup]="changeUserPasswordFrm" (submit)="onFormSubmit()">
            <div class="form-group" *ngIf="alerts != ''">
              <div class="col-xs-12">
                <div class="alert alert-danger" [innerHTML]="alerts">
                </div>
              </div>
            </div>
            <div class="form-group">
              <label for="inputEmail3" class="col-sm-4 control-label">User Id <span class="red">*</span> :</label>
              <div class="col-sm-7">
                  <input type="hidden" class="form-control" formControlName="userId" placeholder="">
                <label type="text" class="form-control">{{changeUserPasswordFrm.controls.loginId.value}}</label>
              </div>
            </div>
            <div class="form-group">
              <label for="inputPassword3" class="col-sm-4 control-label">Old Password <span class="red">*</span> :</label>
              <div class="col-sm-7">
                <input type="password" class="form-control" formControlName="oldPassword" placeholder="" maxlength="50">
                <div *ngIf="!changeUserPasswordFrm.controls.oldPassword.valid && changeUserPasswordFrm.controls.oldPassword.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Old password is required</div>
              </div>
            </div>
            <div class="form-group">
              <label for="inputPassword3" class="col-sm-4 control-label">New Password <span class="red">*</span> :</label>
              <div class="col-sm-7">
                <input type="password" class="form-control" formControlName="newPassword" placeholder="" maxlength="50">
                <span class="help-block">(Minimum 8 characters)</span>
                <div *ngIf="!changeUserPasswordFrm.controls.newPassword.valid && changeUserPasswordFrm.controls.newPassword.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">New password of minimum 8 characters is required</div>
              </div>
            </div>
            <div class="form-group">
              <label for="inputPassword3" class="col-sm-4 control-label">Confirm Password <span class="red">*</span> :</label>
              <div class="col-sm-7">
                <input type="password" class="form-control" formControlName="confirmPassword" placeholder="" maxlength="50">
                <div *ngIf="!changeUserPasswordFrm.controls.confirmPassword.valid && changeUserPasswordFrm.controls.confirmPassword.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Confirm password is required</div>
              </div>
            </div>
            <div class="form-group">
              <div class="col-sm-offset-4 col-sm-7 mar-top17">
                <button type="submit" class="btn btn-primary btn-sm"><i class="fa fa-check"></i> Update</button>
                <button type="button" class="btn btn-primary btn-sm" (click)="ResetFormFields()"><i class="fa fa-close"></i> Cancel</button>
              </div>
            </div>
            <!--cancel-button-->
            <div class="modal fade bs-example-modal-sm ui-draggable" tabindex="-1" role="dialog" id="mymodal">
              <div class="modal-dialog modal-sm" role="document">
                <div class="modal-content">
                  <div class="modal-header annotation-modal-header ui-draggable-handle">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                    <h4 class="modal-title" id="">Alert</h4>
                  </div>
                  <div class="modal-body">
                    <h5>Please enter your old password</h5>
                  </div>
                  <div class="modal-footer">
                    <div class="row">
                      <div class="col-sm-12"><button class="btn btn-primary btn-sm">Ok</button></div>
                    </div>
                  </div>

                </div><!-- /.modal-content -->
              </div><!-- /.modal-dialog -->
            </div><!-- /.modal -->
            <!--cancel-button-->
          </form>
          <!-- form -->
        </div>
      </div>
    </div>
  </div>
</div>
</div>
</div>
 
  <!-- container -->
</div>