-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/1031 add alias-input field when adding new env (#801)
* feat: add name alias input field to adding envs * feat: add validation to add-environments-form * feat: add validation to endpoint * chore: remove console log, change form to div * chore: improve getTitle in env edit modal * feat: context name should not be blank * fix: fix rebase error
- Loading branch information
Showing
4 changed files
with
35 additions
and
21 deletions.
There are no files selected for viewing
26 changes: 16 additions & 10 deletions
26
...angular/io/src/app/settings/environments/environment-edit/environment-edit.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,27 @@ | ||
<div class="container"> | ||
<app-modal-header [title]="getTitle() + ' ' + environment.name" (cancel)="cancel()"></app-modal-header> | ||
<app-modal-header [title]="getTitle()" (cancel)="cancel()"></app-modal-header> | ||
<div class="modal-body"> | ||
<div class="mb-3"> | ||
<div class="needs-validation mb-3"> | ||
<label for="name" class="form-label">Name</label> | ||
<input type="text" class="form-control" id="name" [(ngModel)]="environment.name" /> | ||
</div> | ||
@if (isEdit() && !isDomain()){ | ||
<div class="mb-3"> | ||
<label for="nameAlias" class="form-label">Alias</label> | ||
<input type="text" class="form-control" id="nameAlias" [(ngModel)]="environment.nameAlias" /> | ||
<input type="text" class="form-control" id="name" [(ngModel)]="environment.name" required pattern=".*\S+.*"> | ||
<div class="invalid-feedback"> | ||
Please enter a name | ||
</div> | ||
</div> | ||
@if (!isDomain()) { | ||
<div class="mb-3"> | ||
<label for="nameAlias" class="form-label">Alias</label> | ||
<input type="text" class="form-control" id="nameAlias" [(ngModel)]="environment.nameAlias"/> | ||
</div> | ||
} | ||
</div> | ||
<div class="modal-footer"> | ||
<app-button [variant]="'light'" (click)="cancel()">Cancel</app-button> | ||
@if(permissions().canSave){ | ||
<app-button [variant]="'primary'" (click)="save()">Save</app-button> | ||
@if (permissions().canSave) { | ||
<app-button [variant]="'primary'" | ||
[disabled]="!isValidForm()" | ||
(click)="save()">Save | ||
</app-button> | ||
} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters