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.
76 lines
3.9 KiB
76 lines
3.9 KiB
<form [formGroup]="editForm.form" (ngSubmit)="saveSchema()">
|
|
<sqx-modal-dialog (close)="emitComplete()" large="true">
|
|
<ng-container title>
|
|
Preview Urls
|
|
</ng-container>
|
|
|
|
<ng-container content>
|
|
<sqx-form-hint>
|
|
Adding a preview url generates a link in the content editor, referring to your custom preview or production environment where the content item is used.
|
|
</sqx-form-hint>
|
|
|
|
<sqx-form-hint>
|
|
Read the <a href="https://https://docs.squidex.io/guides/09-preview" sqxExternalLink>documentation</a> before setting up custom content preview urls.
|
|
</sqx-form-hint>
|
|
|
|
<div class="content">
|
|
<div class="mt-4" *ngIf="!isEditable && editForm.form.controls.length === 0">
|
|
No preview urls configured.
|
|
</div>
|
|
|
|
<div class="form-group row no-gutters" *ngFor="let form of editForm.form.controls; let i = index">
|
|
<div class="col col-name pr-1">
|
|
<sqx-control-errors [for]="form.get('name')" fieldName="Name" [submitted]="editForm.submitted | async"></sqx-control-errors>
|
|
|
|
<input type="text" class="form-control" maxlength="1000" [formControl]="form.get('name')" placeholder="Web or Mobile" />
|
|
</div>
|
|
|
|
<div class="col pr-1">
|
|
<sqx-control-errors [for]="form.get('url')" fieldName="Url" [submitted]="editForm.submitted | async"></sqx-control-errors>
|
|
|
|
<input type="text" class="form-control" maxlength="1000" [formControl]="form.get('url')" placeholder="Url with placeholders like ${id} or ${data.slug}" />
|
|
</div>
|
|
|
|
<div class="col-auto col-options">
|
|
<button type="button" class="btn btn-text-danger"
|
|
[disabled]="!isEditable"
|
|
(sqxConfirmClick)="editForm.remove(i)"
|
|
confirmTitle="Remove url"
|
|
confirmText="Do you really want to remove this url?">
|
|
<i class="icon-bin2"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group row no-gutters" [formGroup]="addForm.form" *ngIf="isEditable">
|
|
<div class="col col-name pr-1">
|
|
<sqx-control-errors for="name" [submitted]="addForm.submitted | async"></sqx-control-errors>
|
|
|
|
<input type="text" class="form-control" maxlength="1000" formControlName="name" placeholder="Web or Mobile" />
|
|
</div>
|
|
|
|
<div class="col pr-1">
|
|
<sqx-control-errors for="url" [submitted]="addForm.submitted | async"></sqx-control-errors>
|
|
|
|
<input type="text" class="form-control" maxlength="1000" formControlName="url" placeholder="Url with placeholders like ${id} or ${data.slug}" />
|
|
</div>
|
|
|
|
<div class="col-auto col-options">
|
|
<button type="button" class="btn btn-success" (click)="add()">
|
|
<i class="icon-add"></i>
|
|
</button>
|
|
|
|
<button type="button" class="btn btn-text-secondary" (click)="cancelAdd()">
|
|
<i class="icon-close"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</ng-container>
|
|
|
|
<ng-container footer>
|
|
<button type="reset" class="float-left btn btn-secondary" (click)="emitComplete()" [disabled]="editForm.submitted | async">Cancel</button>
|
|
<button type="submit" class="float-right btn btn-primary" *ngIf="isEditable">Save</button>
|
|
</ng-container>
|
|
</sqx-modal-dialog>
|
|
</form>
|
|
|