Headless CMS and Content Managment Hub
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.
 
 
 
 
 

68 lines
3.3 KiB

<form [formGroup]="editForm.form" (ngSubmit)="saveSchema()">
<div class="card mb-2">
<div class="card-header">Preview URLs</div>
<div class="card-body">
<sqx-form-alert>
Checkout the integrated help page to learn more about preview URL's.
</sqx-form-alert>
<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 variables" />
</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 variables" />
</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>
</div>
<div class="card-footer" *ngIf="isEditable">
<button type="submit" class="float-right btn btn-primary" [class.invisible]="!isEditable">Save</button>
</div>
</div>
</form>