File

core/authentication/provide-phone-number.component.ts

Metadata

Index

Properties
Methods
Inputs
Outputs

Constructor

constructor(loginService: LoginService, alert: AlertService, userService: UserService)
Parameters :
Name Type Optional
loginService LoginService No
alert AlertService No
userService UserService No

Inputs

credentials
Type : ICredentials

Outputs

onCancel
Type : EventEmitter
onChangeView
Type : EventEmitter

Methods

Async save
save()
Returns : any

Properties

Public alert
Type : AlertService
Public loginService
Type : LoginService
phoneNumber
Type : string
requestInProgress
Default value : false
<form #twoFactorForm="ngForm" role="form" class="loginForm" (ngSubmit)="save()" novalidate>
  <div class="legend form-block center" translate>
    Two-factor authentication
  </div>

  <c8y-form-group [ngClass]="requestInProgress || twoFactorForm.invalid ? 'p-b-8' : ''">
    <label translate>Provide your phone number</label>

    <input
      class="form-control"
      [(ngModel)]="phoneNumber"
      #contactPhone="ngModel"
      type="text"
      name="phone"
      autocomplete="off"
      placeholder="{{ 'e.g. +49 9 876 543 210`LOCALIZE`' | translate }}"
      c8yPhoneValidation
      c8yDefaultValidation="phoneNumber"
      required
    />
  </c8y-form-group>

  <button
    title="{{ 'Save and continue' | translate }}"
    type="submit"
    class="btn btn-primary btn-lg btn-block form-group"
    [disabled]="requestInProgress || twoFactorForm.invalid"
  >
    {{ 'Save and continue' | translate }}
  </button>

  <div class="d-flex m-t-8">
    <a
      title="{{ 'Login' | translate }}"
      class="small pointer m-l-auto"
      href="#"
      (click)="onCancel.emit()"
    >
      {{ 'Login' | translate }}
    </a>
  </div>
</form>

results matching ""

    No results matching ""