1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-15 10:35:20 +01:00

PM-5086 - more WIP progress on registration start comp

This commit is contained in:
Jared Snider 2024-05-16 13:40:36 -04:00
parent d5007ee77d
commit 86323532b8
No known key found for this signature in database
GPG Key ID: A149DDD612516286
2 changed files with 15 additions and 5 deletions

View File

@ -1,5 +1,5 @@
<div class="tw-max-w-[28rem] tw-min-w-[28rem]">
<form [formGroup]="formGroup" (ngSubmit)="submit()">
<form [formGroup]="formGroup" [bitSubmit]="submit">
<bit-form-field>
<bit-label>{{ "emailAddress" | i18n }}</bit-label>
<input
@ -7,7 +7,7 @@
bitInput
type="email"
formControlName="email"
[attr.readonly]="queryParamFromOrgInvite ? true : null"
[attr.readonly]="emailReadonly ? true : null"
/>
</bit-form-field>
@ -34,5 +34,9 @@
}}</a>
</bit-label>
</bit-form-control>
<button [block]="true" type="submit" buttonType="primary" bitButton bitFormButton>
{{ "continue" | i18n }}
</button>
</form>
</div>

View File

@ -13,7 +13,12 @@ import { Subject, takeUntil } from "rxjs";
import { JslibModule } from "@bitwarden/angular/jslib.module";
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
import { ButtonModule, CheckboxModule, FormFieldModule } from "@bitwarden/components";
import {
AsyncActionsModule,
ButtonModule,
CheckboxModule,
FormFieldModule,
} from "@bitwarden/components";
@Component({
standalone: true,
@ -24,12 +29,13 @@ import { ButtonModule, CheckboxModule, FormFieldModule } from "@bitwarden/compon
ReactiveFormsModule,
JslibModule,
FormFieldModule,
AsyncActionsModule,
CheckboxModule,
ButtonModule,
],
})
export class RegistrationStartComponent implements OnInit, OnDestroy {
queryParamFromOrgInvite: boolean = false;
emailReadonly: boolean = false;
showTerms = true;
@ -67,7 +73,7 @@ export class RegistrationStartComponent implements OnInit, OnDestroy {
this.route.queryParams.pipe(takeUntil(this.destroy$)).subscribe((qParams) => {
if (qParams.email != null && qParams.email.indexOf("@") > -1) {
this.email?.setValue(qParams.email);
this.queryParamFromOrgInvite = qParams.fromOrgInvite === "true";
this.emailReadonly = qParams.emailReadonly === "true";
}
});
}