mirror of https://github.com/Squidex/squidex.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
2.4 KiB
45 lines
2.4 KiB
<div [formGroup]="actionForm.form" class="form-horizontal">
|
|
<div class="form-group row" *ngFor="let property of actionForm.definition.properties">
|
|
<label class="col-3 col-form-label" [for]="property.name">
|
|
<ng-container *ngIf="property.editor !== 'Checkbox'">{{property.display}}</ng-container> <small class="hint" *ngIf="property.isRequired"> *</small>
|
|
</label>
|
|
|
|
<div class="col-9">
|
|
<sqx-control-errors [for]="property.name"></sqx-control-errors>
|
|
|
|
<ng-container [ngSwitch]="property.editor">
|
|
<ng-container *ngSwitchCase="'Text'">
|
|
<sqx-formattable-input [formControlName]="property.name" type="Text" [formattable]="property.isFormattable"></sqx-formattable-input>
|
|
</ng-container>
|
|
<ng-container *ngSwitchCase="'TextArea'">
|
|
<sqx-formattable-input [formControlName]="property.name" type="Code" [formattable]="property.isFormattable"></sqx-formattable-input>
|
|
</ng-container>
|
|
<ng-container *ngSwitchCase="'Checkbox'">
|
|
<div class="custom-control custom-checkbox">
|
|
<input class="custom-control-input" type="checkbox" id="{{property.name}}" [formControlName]="property.name">
|
|
<label class="custom-control-label" for="{{property.name}}">
|
|
{{property.display}}
|
|
</label>
|
|
</div>
|
|
</ng-container>
|
|
<ng-container *ngSwitchCase="'Dropdown'">
|
|
<select class="custom-select" [formControlName]="property.name">
|
|
<option></option>
|
|
<option *ngFor="let option of property.options" [ngValue]="option">{{option}}</option>
|
|
</select>
|
|
</ng-container>
|
|
<ng-container *ngSwitchDefault>
|
|
<input type="{{property.editor | lowercase}}" class="form-control" id="{{property.name}}" [formControlName]="property.name">
|
|
</ng-container>
|
|
</ng-container>
|
|
|
|
<sqx-form-hint>
|
|
{{property.description}}
|
|
|
|
<div *ngIf="property.isFormattable">
|
|
You can use advanced formatting: <a href="https://docs.squidex.io/concepts/rules#3-formatting" sqxExternalLink>Documentation</a>
|
|
</div>
|
|
</sqx-form-hint>
|
|
</div>
|
|
</div>
|
|
</div>
|