File

core/authentication/password-confirm-modal.component.ts

Metadata

selector c8y-password-confirm-modal
templateUrl ./password-confirm-modal.component.html

Index

Properties
Methods
Outputs

Constructor

constructor(user: UserService, ui: AppStateService, client: FetchClient, alert: AlertService, loginService: LoginService)
Parameters :
Name Type Optional
user UserService No
ui AppStateService No
client FetchClient No
alert AlertService No
loginService LoginService No

Outputs

passwordConfirmedEmitter $event Type: EventEmitter

Methods

cancel
cancel()
Returns : void
createNewClient
createNewClient(strategy: IAuthentication, baseUrl: string)
Parameters :
Name Type Optional
strategy IAuthentication No
baseUrl string No
Returns : any
Async passwordConfirm
passwordConfirm()
Returns : any

Properties

loading
loading:
Default value : false
password
password: string
Type : string
Public ui
ui: AppStateService
Type : AppStateService
Public user
user: UserService
Type : UserService
<c8y-modal [customFooter]="true" [title]="'Confirm your current password' | translate" #modal>
  <form #confirmForm="ngForm" (ngSubmit)="confirmForm.form.valid && passwordConfirm()">
    <c8y-form-group [hasWarning]="true">
      <label translate for="currentPassword">Enter your password</label>
      <input
        id="currentPassword"
        [(ngModel)]="password"
        type="password"
        name="password"
        class="form-control"
        placeholder="{{ 'Enter your password' | translate }}"
        required
      />
      <c8y-messages>
        <c8y-message translate>
          Enter the password of the user that you are currently logged in with.
        </c8y-message>
      </c8y-messages>
    </c8y-form-group>

    <div class="modal-footer">
      <button
        title="{{ 'Cancel' | translate }}"
        class="btn btn-default"
        type="button"
        (click)="cancel()"
        translate
      >
        Cancel
      </button>
      <button
        title="{{ 'Save' | translate }}"
        class="btn btn-primary"
        type="submit"
        [disabled]="!confirmForm.form.valid || loading"
        translate
      >
        Save
      </button>
    </div>
  </form>
</c8y-modal>

result-matching ""

    No results matching ""