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.
 
 
 
 
 

44 lines
1.8 KiB

<form [formGroup]="createForm.form" (ngSubmit)="createApp()">
<sqx-modal-dialog (close)="emitComplete()">
<ng-container title>
<ng-container *ngIf="template; else noTemplate">
Create {{template}} Sample
</ng-container>
<ng-template #noTemplate>
Create App
</ng-template>
</ng-container>
<ng-container content>
<sqx-form-error [error]="createForm.error | async"></sqx-form-error>
<div class="form-group">
<label for="appName">Name <small class="hint">(required)</small></label>
<sqx-control-errors for="name" submitOnly="true" [submitted]="createForm.submitted | async"></sqx-control-errors>
<input type="text" class="form-control" id="appName" formControlName="name" autocomplete="off" sqxTransformInput="LowerCase" sqxFocusOnInit />
<sqx-form-hint>
You can only use letters, numbers and dashes and not more than 40 characters.
</sqx-form-hint>
<sqx-form-hint>
The app name becomes part of the api url:
</sqx-form-hint>
<sqx-code>{{apiUrl.buildUrl("api/content/")}}{{createForm.appName | async}}</sqx-code>
<sqx-form-alert class="mt-4">
The app name cannot be changed later.
</sqx-form-alert>
</div>
</ng-container>
<ng-container footer>
<button type="reset" class="float-left btn btn-secondary" (click)="emitComplete()" [disabled]="createForm.submitted | async">Cancel</button>
<button type="submit" class="float-right btn btn-success">Create</button>
</ng-container>
</sqx-modal-dialog>
</form>