From c2bd11c528901bc00461194c2e7022d76a1a31d5 Mon Sep 17 00:00:00 2001 From: gbrodman Date: Mon, 13 Jul 2026 12:10:44 -0400 Subject: [PATCH] Tweak a few console UI fields (#3146) - treat password fields as passwords - add Validators to a few places - remove empty fields from billing maps if they exist --- console-webapp/src/app/domains/registryLock.component.ts | 6 +++--- console-webapp/src/app/ote/newOte.component.ts | 5 ++++- console-webapp/src/app/registrar/newRegistrar.component.ts | 6 ++++-- .../passwordReset/passwordInputForm.component.html | 6 +++--- .../server/console/settings/RdapRegistrarFieldsAction.java | 2 +- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/console-webapp/src/app/domains/registryLock.component.ts b/console-webapp/src/app/domains/registryLock.component.ts index 8ca9069a7..dbb74d136 100644 --- a/console-webapp/src/app/domains/registryLock.component.ts +++ b/console-webapp/src/app/domains/registryLock.component.ts @@ -14,7 +14,7 @@ import { HttpErrorResponse } from '@angular/common/http'; import { Component, computed } from '@angular/core'; -import { FormControl, FormGroup } from '@angular/forms'; +import { FormControl, FormGroup, Validators } from '@angular/forms'; import { MatSnackBar } from '@angular/material/snack-bar'; import { RegistrarService } from '../registrar/registrar.service'; import { UserDataService } from '../shared/services/userData.service'; @@ -42,11 +42,11 @@ export class RegistryLockComponent { ]; lockDomain = new FormGroup({ - password: new FormControl(''), + password: new FormControl('', [Validators.required]), }); unlockDomain = new FormGroup({ - password: new FormControl(''), + password: new FormControl('', [Validators.required]), relockTime: new FormControl(undefined), }); diff --git a/console-webapp/src/app/ote/newOte.component.ts b/console-webapp/src/app/ote/newOte.component.ts index 71b1b804d..2fd6a2004 100644 --- a/console-webapp/src/app/ote/newOte.component.ts +++ b/console-webapp/src/app/ote/newOte.component.ts @@ -50,7 +50,10 @@ export class NewOteComponent { createOte = new FormGroup({ registrarId: new FormControl('', [Validators.required]), - registrarEmail: new FormControl('', [Validators.required]), + registrarEmail: new FormControl('', [ + Validators.required, + Validators.email, + ]), }); constructor( diff --git a/console-webapp/src/app/registrar/newRegistrar.component.ts b/console-webapp/src/app/registrar/newRegistrar.component.ts index a0d0d9a44..b4613922d 100644 --- a/console-webapp/src/app/registrar/newRegistrar.component.ts +++ b/console-webapp/src/app/registrar/newRegistrar.component.ts @@ -67,8 +67,10 @@ export default class NewRegistrarComponent { onBillingAccountMapChange(val: String) { const billingAccountMap: { [key: string]: string } = {}; this.newRegistrar.billingAccountMap = val.split('\n').reduce((acc, val) => { - const [currency, billingCode] = val.split('='); - acc[currency] = billingCode; + const [currency, billingCode] = val.split('=').map((s) => s?.trim()); + if (currency && billingCode) { + acc[currency] = billingCode; + } return acc; }, billingAccountMap); } diff --git a/console-webapp/src/app/shared/components/passwordReset/passwordInputForm.component.html b/console-webapp/src/app/shared/components/passwordReset/passwordInputForm.component.html index 57b3ee1cb..9545f983d 100644 --- a/console-webapp/src/app/shared/components/passwordReset/passwordInputForm.component.html +++ b/console-webapp/src/app/shared/components/passwordReset/passwordInputForm.component.html @@ -9,7 +9,7 @@ Old password: New password: Confirm new password: