Skip to content

Commit

Permalink
SHIBUI-1378 Fixed issues with new ids for QA
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Jul 30, 2019
1 parent 1c8797b commit 966a242
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions ui/src/app/schema-form/widget/array/array.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<ng-container *ngSwitchDefault>
<sf-form-element class="flex-grow-1" [formProperty]="itemProperty"></sf-form-element>
<div class="py-2">
<button class="btn btn-link pt-1" (click)="removeItem(i, itemProperty); $event.stopPropagation()" role="button">
<button class="btn btn-link pt-1" (click)="removeItem(itemProperty); $event.stopPropagation()" role="button">
<i class="fa fa-fw fa-trash fa-lg text-danger"></i>
<span class="sr-only" translate="action.remove">Remove</span>
</button>
Expand All @@ -48,7 +48,7 @@
<small class="sr-only" *ngIf="itemProperty.value.makeDefault === true" translate="label.default">(default)</small>
</ng-container>
</span>
<button class="btn btn-link pt-1" (click)="removeItem(i, itemProperty); $event.stopPropagation()" role="button">
<button class="btn btn-link pt-1" (click)="removeItem(itemProperty); $event.stopPropagation()" role="button">
<i class="fa fa-fw fa-trash fa-lg text-danger"></i>
<span class="sr-only" translate="action.remove">Remove</span>
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<small class="sr-only" *ngIf="itemProperty.value.makeDefault === true" translate="label.default">(default)</small>
</ng-container>
</span>
<button class="btn btn-link pt-1" (click)="removeItem(i)" role="button">
<button class="btn btn-link pt-1" (click)="removeItem(itemProperty)" role="button">
<i class="fa fa-fw fa-trash fa-lg text-danger"></i>
<span class="sr-only" translate="action.remove">Remove</span>
</button>
Expand Down
9 changes: 5 additions & 4 deletions ui/src/app/schema-form/widget/check/checkbox.component.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<div class="widget form-group">
<ng-container *ngIf="schema.type !== 'array'">
<div class="d-flex justify-content-start">
<div class="custom-control custom-checkbox custom-control-inline custom-control-reverse">
<div class="custom-control custom-checkbox custom-control-inline custom-control-reverse"
[id]="formProperty._canonicalPath + '.parent'">
<input [formControl]="control"
class="custom-control-input"
[attr.name]="name"
Expand All @@ -20,12 +21,12 @@
</div>
</ng-container>
<ng-container *ngIf="schema.type === 'array'">
<div *ngFor="let option of schema.items.oneOf" class="checkbox">
<div *ngFor="let option of schema.items.oneOf; let i = index;" class="checkbox">
<label class="horizontal control-label" [attr.for]="formProperty._canonicalPath">
<input
[id]="formProperty._canonicalPath"
[id]="formProperty._canonicalPath + '.' + i"
[attr.name]="name"
value="{{option.enum[0]}}"
[value]="option.enum[0]"
type="checkbox"
[attr.disabled]="schema.readOnly?true:null"
(change)="onCheck($event.target)"
Expand Down
4 changes: 2 additions & 2 deletions ui/src/app/schema-form/widget/radio/radio.component.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<div class="widget form-group">
<label [translate]="schema.title">{{schema.title}}</label>
<span *ngIf="schema.description" class="formHelp" [translate]="schema.description">{{schema.description}}</span>
<ng-container *ngFor="let option of schema.oneOf">
<ng-container *ngFor="let option of schema.oneOf; let i = index;">
<div class="form-check" [ngClass]="schema.widget.class">
<input class="form-check-input" [formControl]="control" type="radio" [attr.name]="name" [id]="formProperty._canonicalPath" value="{{option.enum[0]}}" [attr.disabled]="schema.readOnly">
<input class="form-check-input" [formControl]="control" type="radio" [attr.name]="name" [id]="formProperty._canonicalPath + '.' + i" [value]="option.enum[0]" [attr.disabled]="schema.readOnly">
<label class="form-check-label" [for]="name" [translate]="option.description">{{option.description}}</label>
</div>
</ng-container>
Expand Down

0 comments on commit 966a242

Please sign in to comment.