<ion-header>
    <ion-toolbar>
        <ion-buttons slot="start">
            <ion-back-button [attr.aria-label]="'core.back' | translate"></ion-back-button>
        </ion-buttons>

        <ion-title>{{ 'core.login.passwordforgotten' | translate }}</ion-title>
    </ion-toolbar>
</ion-header>
<ion-content>
    <ion-list lines="none">
        <ion-item class="ion-text-wrap">
            {{ 'core.login.passwordforgotteninstructions2' | translate }}
        </ion-item>
    </ion-list>
    <ion-card>
        <form ion-list [formGroup]="myForm" (ngSubmit)="resetPassword($event)" #resetPasswordForm>
            <ion-item-divider class="ion-text-wrap">
                {{ 'core.login.searchby' | translate }}
            </ion-item-divider>
            <ion-radio-group formControlName="field">
                <ion-item>
                    <ion-label>{{ 'core.login.username' | translate }}</ion-label>
                    <ion-radio slot="start" value="username"></ion-radio>
                </ion-item>
                <ion-item>
                    <ion-label>{{ 'core.user.email' | translate }}</ion-label>
                    <ion-radio slot="start" value="email"></ion-radio>
                </ion-item>
            </ion-radio-group>
            <ion-item>
                <ion-input type="text" name="value" placeholder="{{ 'core.login.usernameoremail' | translate }}"
                    formControlName="value" autocapitalize="none" autocorrect="off" [core-auto-focus]="autoFocus">
                </ion-input>
            </ion-item>
            <ion-button type="submit" class="ion-margin" expand="block" [disabled]="!myForm.valid">
                {{ 'core.courses.search' | translate }}
            </ion-button>
        </form>
    </ion-card>
</ion-content>
