Extend editable values for edit war page

pull/34/head
HardiReady 2018-04-29 10:39:01 +02:00
parent 266ce9a48a
commit 4b617ec67a
2 changed files with 39 additions and 9 deletions

View File

@ -39,7 +39,7 @@ export class WarService {
}
updateWar(war: War) {
return this.http.put(this.config.apiWarPath, war)
return this.http.patch(this.config.apiWarPath, war)
.map(res => res.json());
}
}

View File

@ -1,5 +1,5 @@
<form #form="ngForm" class="overview">
<h3>Schlacht hinzufügen</h3>
<h3>Schlacht bearbeiten</h3>
<div class="form-group">
<label for="title">Titel</label>
@ -8,7 +8,6 @@
name="title"
id="title"
required maxlength="50"/>
<show-error displayName="Name" controlPath="title"></show-error>
</div>
@ -26,12 +25,43 @@
</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="showFileError">
Logfile muss im Format RPT, LOG oder TXT vorliegen
</span>
<label for="ptBlufor">Punkte NATO</label>
<input type="number" class="form-control"
[(ngModel)]="war.ptBlufor"
name="ptBlufor"
id="ptBlufor"
required min="0"/>
<show-error displayName="Name" controlPath="ptBlufor"></show-error>
</div>
<div class="form-group">
<label for="ptOpfor">Punkte CSAT</label>
<input type="number" class="form-control"
[(ngModel)]="war.ptOpfor"
name="ptOpfor"
id="ptOpfor"
required min="0"/>
<show-error displayName="Name" controlPath="ptOpfor"></show-error>
</div>
<div class="form-group">
<label for="endBudgetBlufor">Endbudget NATO</label>
<input type="number" class="form-control"
[(ngModel)]="war.endBudgetBlufor"
name="endBudgetBlufor"
id="endBudgetBlufor"
required />
<show-error displayName="Name" controlPath="endBudgetBlufor"></show-error>
</div>
<div class="form-group">
<label for="endBudgetOpfor">Endbudget CSAT</label>
<input type="number" class="form-control"
[(ngModel)]="war.endBudgetOpfor"
name="endBudgetOpfor"
id="endBudgetOpfor"
required />
<show-error displayName="Name" controlPath="endBudgetOpfor"></show-error>
</div>
<button id="cancel"