89 lines
2.5 KiB
HTML
89 lines
2.5 KiB
HTML
<form #form="ngForm" class="overview">
|
|
<h3>Schlacht hinzufügen</h3>
|
|
|
|
<div class="form-group">
|
|
<label for="title">Titel</label>
|
|
<input type="text" class="form-control"
|
|
[(ngModel)]="war.title"
|
|
name="title"
|
|
id="title"
|
|
required maxlength="50"/>
|
|
|
|
<show-error text="Name" path="title"></show-error>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="date">Datum</label>
|
|
<input type="date" class="form-control"
|
|
[(ngModel)]="war.date"
|
|
name="date"
|
|
id="date"
|
|
required/>
|
|
<show-error text="Datum" path="date"></show-error>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="ptblu">Punkte NATO</label>
|
|
<input type="number" class="form-control" step="1"
|
|
[(ngModel)]="war.ptBlufor"
|
|
name="ptblu"
|
|
id="ptblu"
|
|
required/>
|
|
<show-error text="Punkte NATO" path="ptblu"></show-error>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="ptopf">Punkte CSAT</label>
|
|
<input type="number" class="form-control" step="1"
|
|
[(ngModel)]="war.ptOpfor"
|
|
name="ptopf"
|
|
id="ptopf"
|
|
required/>
|
|
<show-error text="Punkte CSAT" path="ptopf"></show-error>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="campaign">Kampagne</label>
|
|
<select class="form-control"
|
|
name="campaign"
|
|
id="campaign"
|
|
[(ngModel)]="war.campaign"
|
|
required>
|
|
<option *ngFor="let campaign of warService.campaigns" [ngValue]="campaign._id">
|
|
{{campaign.title}}
|
|
</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="log">Logfile</label>
|
|
<input id="log" name="log" class="ui-button form-control" type="file"
|
|
(change)="fileChange($event)">
|
|
<span class="label label-bg label-danger center-block" style="font-size:small" *ngIf="showImageError">
|
|
Logfile muss im Format RPT, LOG oder TXT vorliegen
|
|
</span>
|
|
</div>
|
|
|
|
<button id="cancel"
|
|
*ngIf="!loading"
|
|
(click)="cancel()"
|
|
class="btn btn-default">
|
|
Abbrechen
|
|
</button>
|
|
|
|
<button id="save"
|
|
*ngIf="!loading"
|
|
(click)="saveWar()"
|
|
class="btn btn-default"
|
|
[disabled]="!form.valid">
|
|
Bestätigen
|
|
</button>
|
|
|
|
<span *ngIf="loading" class="load-arrow glyphicon-refresh-animate"></span>
|
|
<span *ngIf="showErrorLabel"
|
|
class="center-block label label-danger" style="font-size: medium; padding: 2px; margin-top: 2px">
|
|
{{error}}
|
|
</span>
|
|
|
|
</form>
|