mirror of https://github.com/Squidex/squidex.git
48 changed files with 315 additions and 209 deletions
@ -1,36 +1,36 @@ |
|||
<div [formGroup]="actionForm" class="form-horizontal"> |
|||
<div class="form-group row" *ngFor="let property of definition.properties"> |
|||
<label class="col-3 col-form-label" [for]="property.name"> |
|||
<span *ngIf="property.editor !== 'Checkbox'">{{property.display}}</span> |
|||
<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" [submitted]="actionFormSubmitted"></sqx-control-errors> |
|||
|
|||
<div [ngSwitch]="property.editor"> |
|||
<div *ngSwitchCase="'TextArea'"> |
|||
<ng-container [ngSwitch]="property.editor"> |
|||
<ng-container *ngSwitchCase="'TextArea'"> |
|||
<textarea class="form-control" id="{{property.name}}" [formControlName]="property.name"></textarea> |
|||
</div> |
|||
<div *ngSwitchCase="'Checkbox'"> |
|||
</ng-container> |
|||
<ng-container *ngSwitchCase="'Checkbox'"> |
|||
<div class="form-check"> |
|||
<input class="form-check-input" type="checkbox" [formControlName]="property.name" /> |
|||
<label class="form-check-label" [for]="property.name"> |
|||
{{property.display}} |
|||
</label> |
|||
</div> |
|||
</div> |
|||
<div *ngSwitchDefault> |
|||
</ng-container> |
|||
<ng-container *ngSwitchDefault> |
|||
<input type="{{property.editor | lowercase}}" class="form-control" id="{{property.name}}" [formControlName]="property.name" /> |
|||
</div> |
|||
</div> |
|||
</ng-container> |
|||
</ng-container> |
|||
|
|||
<small class="form-text text-muted"> |
|||
<sqx-form-hint> |
|||
{{property.description}} |
|||
|
|||
<ng-container *ngIf="property.isFormattable"> |
|||
You can use advanced formatting: <a href="https://docs.squidex.io/concepts/rules#3-formatting" sqxExternalLink>Documentation</a> |
|||
</ng-container> |
|||
</small> |
|||
</sqx-form-hint> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
@ -1,29 +1,29 @@ |
|||
<div [ngSwitch]="field.properties.fieldType"> |
|||
<div *ngSwitchCase="'Number'"> |
|||
<ng-container [ngSwitch]="field.properties.fieldType"> |
|||
<ng-container *ngSwitchCase="'Number'"> |
|||
<sqx-number-ui [editForm]="editForm" [field]="field" [properties]="field.properties"></sqx-number-ui> |
|||
</div> |
|||
<div *ngSwitchCase="'String'"> |
|||
</ng-container> |
|||
<ng-container *ngSwitchCase="'String'"> |
|||
<sqx-string-ui [editForm]="editForm" [field]="field" [properties]="field.properties"></sqx-string-ui> |
|||
</div> |
|||
<div *ngSwitchCase="'Boolean'"> |
|||
</ng-container> |
|||
<ng-container *ngSwitchCase="'Boolean'"> |
|||
<sqx-boolean-ui [editForm]="editForm" [field]="field" [properties]="field.properties"></sqx-boolean-ui> |
|||
</div> |
|||
<div *ngSwitchCase="'DateTime'"> |
|||
</ng-container> |
|||
<ng-container *ngSwitchCase="'DateTime'"> |
|||
<sqx-date-time-ui [editForm]="editForm" [field]="field" [properties]="field.properties"></sqx-date-time-ui> |
|||
</div> |
|||
<div *ngSwitchCase="'Geolocation'"> |
|||
</ng-container> |
|||
<ng-container *ngSwitchCase="'Geolocation'"> |
|||
<sqx-geolocation-ui [editForm]="editForm" [field]="field" [properties]="field.properties"></sqx-geolocation-ui> |
|||
</div> |
|||
<div *ngSwitchCase="'Json'"> |
|||
</ng-container> |
|||
<ng-container *ngSwitchCase="'Json'"> |
|||
<sqx-json-ui [editForm]="editForm" [field]="field" [properties]="field.properties"></sqx-json-ui> |
|||
</div> |
|||
<div *ngSwitchCase="'Assets'"> |
|||
</ng-container> |
|||
<ng-container *ngSwitchCase="'Assets'"> |
|||
<sqx-assets-ui [editForm]="editForm" [field]="field" [properties]="field.properties"></sqx-assets-ui> |
|||
</div> |
|||
<div *ngSwitchCase="'References'"> |
|||
</ng-container> |
|||
<ng-container *ngSwitchCase="'References'"> |
|||
<sqx-references-ui [editForm]="editForm" [field]="field" [properties]="field.properties"></sqx-references-ui> |
|||
</div> |
|||
<div *ngSwitchCase="'Tags'"> |
|||
</ng-container> |
|||
<ng-container *ngSwitchCase="'Tags'"> |
|||
<sqx-tags-ui [editForm]="editForm" [field]="field" [properties]="field.properties"></sqx-tags-ui> |
|||
</div> |
|||
</div> |
|||
</ng-container> |
|||
</ng-container> |
|||
@ -1,29 +1,29 @@ |
|||
<div [ngSwitch]="field.properties.fieldType"> |
|||
<div *ngSwitchCase="'Number'"> |
|||
<ng-container [ngSwitch]="field.properties.fieldType"> |
|||
<ng-container *ngSwitchCase="'Number'"> |
|||
<sqx-number-validation [editForm]="editForm" [field]="field" [properties]="field.properties"></sqx-number-validation> |
|||
</div> |
|||
<div *ngSwitchCase="'String'"> |
|||
</ng-container> |
|||
<ng-container *ngSwitchCase="'String'"> |
|||
<sqx-string-validation [editForm]="editForm" [field]="field" [properties]="field.properties" [patterns]="patterns"></sqx-string-validation> |
|||
</div> |
|||
<div *ngSwitchCase="'Boolean'"> |
|||
</ng-container> |
|||
<ng-container *ngSwitchCase="'Boolean'"> |
|||
<sqx-boolean-validation [editForm]="editForm" [field]="field" [properties]="field.properties"></sqx-boolean-validation> |
|||
</div> |
|||
<div *ngSwitchCase="'DateTime'"> |
|||
</ng-container> |
|||
<ng-container *ngSwitchCase="'DateTime'"> |
|||
<sqx-date-time-validation [editForm]="editForm" [field]="field" [properties]="field.properties"></sqx-date-time-validation> |
|||
</div> |
|||
<div *ngSwitchCase="'Geolocation'"> |
|||
</ng-container> |
|||
<ng-container *ngSwitchCase="'Geolocation'"> |
|||
<sqx-geolocation-validation [editForm]="editForm" [field]="field" [properties]="field.properties"></sqx-geolocation-validation> |
|||
</div> |
|||
<div *ngSwitchCase="'Json'"> |
|||
</ng-container> |
|||
<ng-container *ngSwitchCase="'Json'"> |
|||
<sqx-json-validation [editForm]="editForm" [field]="field" [properties]="field.properties"></sqx-json-validation> |
|||
</div> |
|||
<div *ngSwitchCase="'Assets'"> |
|||
</ng-container> |
|||
<ng-container *ngSwitchCase="'Assets'"> |
|||
<sqx-assets-validation [editForm]="editForm" [field]="field" [properties]="field.properties"></sqx-assets-validation> |
|||
</div> |
|||
<div *ngSwitchCase="'References'"> |
|||
</ng-container> |
|||
<ng-container *ngSwitchCase="'References'"> |
|||
<sqx-references-validation [editForm]="editForm" [field]="field" [properties]="field.properties"></sqx-references-validation> |
|||
</div> |
|||
<div *ngSwitchCase="'Tags'"> |
|||
</ng-container> |
|||
<ng-container *ngSwitchCase="'Tags'"> |
|||
<sqx-tags-validation [editForm]="editForm" [field]="field" [properties]="field.properties"></sqx-tags-validation> |
|||
</div> |
|||
</div> |
|||
</ng-container> |
|||
</ng-container> |
|||
@ -1,7 +1,7 @@ |
|||
<div class="errors-container" *ngIf="snapshot.errorMessages.length > 0" @fade> |
|||
<div class="errors"> |
|||
<span *ngFor="let message of snapshot.errorMessages"> |
|||
<ng-container *ngFor="let message of snapshot.errorMessages"> |
|||
{{message}} |
|||
</span> |
|||
</ng-container> |
|||
</div> |
|||
</div> |
|||
@ -0,0 +1,21 @@ |
|||
/* |
|||
* Squidex Headless CMS |
|||
* |
|||
* @license |
|||
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. |
|||
*/ |
|||
|
|||
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; |
|||
|
|||
@Component({ |
|||
selector: 'sqx-form-alert', |
|||
template: ` |
|||
<div class="alert alert-info mt-2 {{class}}"> |
|||
<i class="icon-info-outline"></i> <ng-content></ng-content> |
|||
</div>`,
|
|||
changeDetection: ChangeDetectionStrategy.OnPush |
|||
}) |
|||
export class FormAlertComponent { |
|||
@Input() |
|||
public class: string; |
|||
} |
|||
@ -1,3 +0,0 @@ |
|||
<ng-container *ngIf="error"> |
|||
<div class="form-alert form-alert-error" [innerHTML]="error" @fade></div> |
|||
</ng-container> |
|||
@ -1,2 +0,0 @@ |
|||
@import '_mixins'; |
|||
@import '_vars'; |
|||
@ -0,0 +1,18 @@ |
|||
/* |
|||
* Squidex Headless CMS |
|||
* |
|||
* @license |
|||
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. |
|||
*/ |
|||
|
|||
import { ChangeDetectionStrategy, Component } from '@angular/core'; |
|||
|
|||
@Component({ |
|||
selector: 'sqx-form-hint', |
|||
template: ` |
|||
<small class="text-muted form-text"> |
|||
<ng-content></ng-content> |
|||
</small>`,
|
|||
changeDetection: ChangeDetectionStrategy.OnPush |
|||
}) |
|||
export class FormHintComponent {} |
|||
Binary file not shown.
|
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 92 KiB |
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue