From c4e41f9770f7bb2730d1b685c0761aa43ea6ad2b Mon Sep 17 00:00:00 2001 From: Damien Vitrac Date: Mon, 3 Jul 2023 15:45:47 +0200 Subject: [PATCH] Form --- ui/src/app/apps/add/add.component.scss | 3 +++ ui/src/app/apps/add/register/register.component.html | 6 +++--- ui/src/app/apps/add/register/register.component.ts | 6 +++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ui/src/app/apps/add/add.component.scss b/ui/src/app/apps/add/add.component.scss index b60a94421..52c3d619c 100644 --- a/ui/src/app/apps/add/add.component.scss +++ b/ui/src/app/apps/add/add.component.scss @@ -3,4 +3,7 @@ padding: .6rem 0; margin: 0; } + .clr-error .clr-select-wrapper:after, .clr-success .clr-select-wrapper:after { + right: 0; + } } diff --git a/ui/src/app/apps/add/register/register.component.html b/ui/src/app/apps/add/register/register.component.html index 13bb812f3..12f66ba9a 100644 --- a/ui/src/app/apps/add/register/register.component.html +++ b/ui/src/app/apps/add/register/register.component.html @@ -63,9 +63,9 @@ formControlName="bootVersion" class="clr-select" > - - + diff --git a/ui/src/app/apps/add/register/register.component.ts b/ui/src/app/apps/add/register/register.component.ts index 3fad8d58a..574db1eff 100644 --- a/ui/src/app/apps/add/register/register.component.ts +++ b/ui/src/app/apps/add/register/register.component.ts @@ -14,6 +14,7 @@ import {TranslateService} from '@ngx-translate/core'; export class RegisterComponent implements OnInit { forms: UntypedFormGroup[] = []; applicationTypes = ApplicationType; + bootVersions = ['2', '3']; submitted = false; isImporting = false; @@ -53,6 +54,7 @@ export class RegisterComponent implements OnInit { type: form.get('type').value as ApplicationType, uri: form.get('uri').value, metaDataUri: form.get('metaDataUri').value, + bootVersion: form.get('bootVersion').value, force: form.get('force').value }; } @@ -102,7 +104,8 @@ export class RegisterComponent implements OnInit { form.get('uri').hasError('required') && form.get('name').hasError('required') && form.get('metaDataUri').value === '' && - form.get('type').hasError('required') + form.get('type').hasError('required') && + form.get('bootVersion').hasError('required') ); } @@ -113,6 +116,7 @@ export class RegisterComponent implements OnInit { type: new UntypedFormControl('', Validators.required), uri: new UntypedFormControl('', [AppsAddValidator.appUri, Validators.required]), metaDataUri: new UntypedFormControl('', AppsAddValidator.appUri), + bootVersion: new UntypedFormControl('', Validators.required), force: new UntypedFormControl(false) });