connect-admin/app/pages/divhelpcontent/div-help-content-form.compo...

50 lines
2.1 KiB
HTML

<div *ngIf="errorMessage" class="uk-alert-danger" uk-alert>{{errorMessage}}</div>
<form [formGroup]="myForm">
<div class="form-group">
<!--div class="form-group" [ngClass]="{'has-error':!myForm.controls.divId.valid && myForm.controls.divId.dirty}"-->
<label *ngIf="showPageSelect" for="pageTag">Select Page</label>
<select *ngIf="showPageSelect" id="pageTag" (change)="pageSelected($event)">
<option *ngIf="!pageId"></option>
<option *ngFor="let page of availablePages" [value]="page._id">{{page.name}}</option>
</select>
<label *ngIf="pageId" for="divTag">Select Class</label>
<select *ngIf="pageId" formControlName="divId" id="divTag" class="form-control" (change)="selectedDiv($event)">
<option *ngFor="let div of availableDivs" [value]="div._id">{{div.name}}</option>
</select>
<!--/div-->
</div>
<div class="form-group" [ngClass]="{'has-error':!myForm.controls.content.valid && myForm.controls.content.dirty}">
<label>Content</label>
<div>
<ckeditor
[readonly]="false"
debounce="500"
formControlName="content"
[config]="{allowedContent: true,extraAllowedContent : '*(*)'}">
<!--id="contentTag"-->
<!--(ready)="onReady($event)"-->
<!--(focus)="onFocus($event)"-->
<!--[config]="{uiColor: '#99000'}"-->
<!--(blur)="onBlur($event)"-->
<!--(change)="onChange($event)"-->
</ckeditor>
</div>
<!--<textarea class="form-control" formControlName="content" id="contentTag" placeholder="Content" rows="3"></textarea>-->
</div>
<div class="form-group">
<label>Select Status</label>
<label class="checkbox">
<span style="font-weight: normal;">Active</span>
<input tabindex="0" type="checkbox" formControlName="isActive">
</label>
</div>
<input type="hidden" formControlName="_id">
</form>
<!--<pre>-->
<!--{{myForm.value | json}}-->
<!--{{myForm.valid}}-->
<!--</pre>-->