26 lines
1.5 KiB
HTML
26 lines
1.5 KiB
HTML
<form [formGroup]="myForm">
|
|
<div class="form-group required" [ngClass]="{'has-error':!myForm.controls.name.valid && myForm.controls.name.dirty}">
|
|
<label for="topicNameTag">Topic Name</label>
|
|
<input type="text" class="form-control" formControlName="name" id="topicNameTag" placeholder="Topic Name">
|
|
</div>
|
|
<div class="form-group" [ngClass]="{'has-error':!myForm.controls.description.valid && myForm.controls.description.dirty}">
|
|
<label for="topicDescTag">Topic Description</label>
|
|
<textarea class="form-control" formControlName="description" id="topicDescTag" placeholder="Topic Description" rows="3"></textarea>
|
|
</div>
|
|
<div class="form-group" [ngClass]="{'has-error':!myForm.controls.weight.valid && myForm.controls.weight.dirty}">
|
|
<label for="topicWeightTag">Weight</label>
|
|
<input type="number" step="0.1" class="form-control" formControlName="weight" id="topicWeightTag" placeholder="Topic Weight (e.g. 3.5)">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="topicQuestionOrder">Order questions by</label>
|
|
<select class="form-control" id="topicQuestionOrder" formControlName="questionOrder">
|
|
<option value="hits">Hit Count</option>
|
|
<option value="weight">Weight</option>
|
|
</select>
|
|
</div>
|
|
<input type="hidden" formControlName="_id">
|
|
<!--<input type="hidden" formControlName="date">-->
|
|
</form>
|
|
<!--<pre>-->
|
|
<!--{{myForm.value | json}}-->
|
|
<!--</pre>--> |