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.
49 lines
1.6 KiB
49 lines
1.6 KiB
5 years ago
|
<h2 mat-dialog-title>创建教员</h2>
|
||
|
|
||
|
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container">
|
||
|
|
||
|
<div>
|
||
|
<mat-form-field>
|
||
|
<input matInput id="idNumber" name="idNumber"
|
||
|
required ngModel placeholder="请输入帐号" autocomplete="off" pattern="^[a-zA-Z][a-zA-Z0-9_]{4,19}$">
|
||
|
<mat-error>
|
||
|
<strong>帐号格式为字母+数字</strong>
|
||
|
</mat-error>
|
||
|
</mat-form-field>
|
||
|
</div>
|
||
|
|
||
|
<div>
|
||
|
<mat-form-field>
|
||
|
<input matInput id="realName" name="realName"
|
||
|
maxlength="100"
|
||
|
required ngModel placeholder="请输入真实姓名" autocomplete="off">
|
||
|
</mat-form-field>
|
||
|
</div>
|
||
|
|
||
|
<div>
|
||
|
<mat-form-field>
|
||
|
<mat-select placeholder="请选择职务" [formControl]="toppings" multiple required>
|
||
|
<div style="float: left;">
|
||
|
<mat-option *ngFor="let item of detachmentPosts" [value]="item.id">{{item.name}}</mat-option>
|
||
|
</div>
|
||
|
<div style="float: left;">
|
||
|
<mat-option *ngFor="let item of brigadePosts" [value]="item.id">{{item.name}}</mat-option>
|
||
|
</div>
|
||
|
<div style="float: left;">
|
||
|
<mat-option *ngFor="let item of RescueStationPosts" [value]="item.id">{{item.name}}</mat-option>
|
||
|
</div>
|
||
|
</mat-select>
|
||
|
</mat-form-field>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
<div mat-dialog-content *ngIf="errmsg">
|
||
|
<p style="font-size: 14px; color: red;">{{errmsg}}</p>
|
||
|
</div>
|
||
|
|
||
|
<div mat-dialog-actions>
|
||
|
<button mat-raised-button color="primary" type="submit" [disabled]="!form.form.valid || toppings.value == null">确定</button>
|
||
|
<button mat-raised-button mat-dialog-close>取消</button>
|
||
|
</div>
|
||
|
|
||
|
</form>
|