<div class="form-wrapper">
    <form [formGroup]="newPasswordForm" (ngSubmit)="submitNewPassword()" autocomplete="off">
        <h3 translate>Please enter your new password</h3>
        <mat-form-field>
            <input
                matInput
                autocomplete="off"
                required
                placeholder="{{ 'New password' | translate }}"
                formControlName="password"
                type="password"
            />
            <mat-error *ngIf="newPasswordForm.get('password').hasError('required')" translate>
                A password is required
            </mat-error>
        </mat-form-field>
        <br />
        <button
            type="submit"
            mat-raised-button
            color="primary"
            class="submit-button"
            [disabled]="newPasswordForm.invalid"
        >
            {{ 'Reset password' | translate }}
        </button>
        &nbsp;
        <button type="button" mat-button routerLink="/login">
            {{ 'Back to login' | translate }}
        </button>
    </form>
</div>
