Skip to content

Commit

Permalink
Merge pull request #25343 from mshima/sonar-img
Browse files Browse the repository at this point in the history
fix user-management sonar issues and adjust modal close button.
  • Loading branch information
DanielFran authored Feb 27, 2024
2 parents 983fc7d + 70cc2ef commit 4ba585b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<div class="modal-header">
<h4 class="modal-title" <%= jhiPrefix %>Translate="entity.delete.title">__jhiTransformTranslate__('entity.delete.title')</h4>

<button type="button" class="btn-close" data-dismiss="modal" (click)="cancel()">&times;</button>
<span class="btn btn-close" data-dismiss="modal" aria-hidden="true" (click)="cancel()"></span>
</div>

<div class="modal-body">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
<<%= jhiPrefixDashed %>-alert-error></<%= jhiPrefixDashed %>-alert-error>

<div class="mb-3" [hidden]="!editForm.value.id">
<label <%= jhiPrefix %>Translate="global.field.id">__jhiTransformTranslate__('global.field.id')</label>
<input type="text" class="form-control" name="id" formControlName="id" readonly />
<label class="form-label" for="field_id" <%= jhiPrefix %>Translate="global.field.id">__jhiTransformTranslate__('global.field.id')</label>
<input type="text" id="field_id" class="form-control" name="id" formControlName="id" readonly />
</div>

<div class="mb-3">
<label class="form-label" <%= jhiPrefix %>Translate="userManagement.login">__jhiTransformTranslate__('userManagement.login')</label>
<input type="text" class="form-control" name="login" formControlName="login" />
<label class="form-label" for="field_login" <%= jhiPrefix %>Translate="userManagement.login">__jhiTransformTranslate__('userManagement.login')</label>
<input type="text" id="field_login" class="form-control" name="login" formControlName="login" />

@if (editForm.get('login')!.invalid && (editForm.get('login')!.dirty || editForm.get('login')!.touched)) {
<div>
Expand All @@ -57,8 +57,8 @@
</div>

<div class="mb-3">
<label class="form-label" <%= jhiPrefix %>Translate="userManagement.firstName">__jhiTransformTranslate__('userManagement.firstName')</label>
<input type="text" class="form-control" name="firstName" formControlName="firstName" />
<label class="form-label" for="field_firstName" <%= jhiPrefix %>Translate="userManagement.firstName">__jhiTransformTranslate__('userManagement.firstName')</label>
<input type="text" id="field_firstName" class="form-control" name="firstName" formControlName="firstName" />

@if (editForm.get('firstName')!.invalid && (editForm.get('firstName')!.dirty || editForm.get('firstName')!.touched)) {
<div>
Expand All @@ -73,8 +73,8 @@
</div>

<div class="mb-3">
<label <%= jhiPrefix %>Translate="userManagement.lastName">__jhiTransformTranslate__('userManagement.lastName')</label>
<input type="text" class="form-control" name="lastName" formControlName="lastName" />
<label class="form-label" for="field_lastName" <%= jhiPrefix %>Translate="userManagement.lastName">__jhiTransformTranslate__('userManagement.lastName')</label>
<input type="text" id="field_lastName" class="form-control" name="lastName" formControlName="lastName" />

@if (editForm.get('lastName')!.invalid && (editForm.get('lastName')!.dirty || editForm.get('lastName')!.touched)) {
<div>
Expand All @@ -89,8 +89,8 @@
</div>

<div class="mb-3">
<label class="form-label" <%= jhiPrefix %>Translate="userManagement.email">__jhiTransformTranslate__('userManagement.email')</label>
<input type="email" class="form-control" name="email" formControlName="email" />
<label class="form-label" for="field_email" <%= jhiPrefix %>Translate="userManagement.email">__jhiTransformTranslate__('userManagement.email')</label>
<input type="email" id="field_email" class="form-control" name="email" formControlName="email" />

@if (editForm.get('email')!.invalid && (editForm.get('email')!.dirty || editForm.get('email')!.touched)) {
<div>
Expand Down Expand Up @@ -140,7 +140,7 @@
@if (languages && languages.length > 0) {
<div class="mb-3">
<label <%= jhiPrefix %>Translate="userManagement.langKey">__jhiTransformTranslate__('userManagement.langKey')</label>
<label class="form-label" for="langKey" <%= jhiPrefix %>Translate="userManagement.langKey">__jhiTransformTranslate__('userManagement.langKey')</label>
<select class="form-control" id="langKey" name="langKey" formControlName="langKey">
@for (language of languages; track $index) {
<option [value]="language">{{ language | findLanguageFromKey }}</option>
Expand All @@ -151,8 +151,8 @@
<%_ } _%>

<div class="mb-3">
<label <%= jhiPrefix %>Translate="userManagement.profiles">__jhiTransformTranslate__('userManagement.profiles')</label>
<select class="form-control" multiple name="authority" formControlName="authorities">
<label class="form-label" for="field_authority" <%= jhiPrefix %>Translate="userManagement.profiles">__jhiTransformTranslate__('userManagement.profiles')</label>
<select class="form-control" id="field_authority" multiple name="authority" formControlName="authorities">
@for (authority of authorities(); track $index) {
<option [value]="authority">{{ authority }}</option>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
<div class="modal-header">
<h4 class="modal-title" data-cy="<%= entityInstance %>DeleteDialogHeading" <%= jhiPrefix %>Translate="entity.delete.title">__jhiTransformTranslate__('entity.delete.title')</h4>

<button type="button" class="btn-close" data-dismiss="modal" (click)="cancel()">&times;</button>
<span class="btn btn-close" data-dismiss="modal" aria-hidden="true"
(click)="cancel()"></span>
</div>

<div class="modal-body">
Expand Down

0 comments on commit 4ba585b

Please sign in to comment.