argos/dmp-frontend/src/app/shared/componentsAdmin/radiobox/radiobox-component.html

35 lines
1.0 KiB
HTML

<h5 style="font-weight: bold">Radio Box Description</h5>
<div [formGroup]="form">
<div fxLayout="row">
<div fxFlex>
<mat-form-field class="full-width">
<input matInput type="string" placeholder="RadioBox Placeholder" [formControl]="this.form.get('data').get('label')">
</mat-form-field>
</div>
</div>
<div>
<div>
<div *ngFor="let option of form.get('data').get('options')['controls'] index as i">
<div fxLayout="row">
<div fxFlex>
<mat-form-field class="full-width">
<input matInput type="string" placeholder="Label" [formControl]="this.form.get('data').get('options').get(''+i).get('label')">
</mat-form-field>
</div>
<div fxFlex>
<mat-form-field class="full-width">
<input matInput type="string" placeholder="Value" [formControl]="this.form.get('data').get('options').get(''+i).get('value')">
</mat-form-field>
</div>
</div>
</div>
</div>
</div>
<div>
<button mat-button (click)="addNewRow()" style="cursor: pointer">
Add +
</button>
</div>
</div>