This repository has been archived on 2021-08-17. You can view files and clone it, but cannot push or open issues or pull requests.
wendys-racing-horses/frontend/wendys-friends/src/app/component/update-owner/update-owner.component.html

27 lines
1.1 KiB
HTML

<div *ngIf="error" class="alert alert-danger alert-dismissible fade show" role="alert">
<strong>Error! </strong> {{ errorMessage }}
<button type="button" (click)="vanishError()" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div *ngIf="success" class="alert alert-success alert-dismissible fade show" role="alert">
<p><strong>Success! </strong> Owner {{ success }} has been successfully updated. </p>
<button type="button" (click)="vanishAlert()" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="container">
<h1>Update owner</h1>
<form (ngSubmit)="updateOwner()" #ownerForm="ngForm">
<div class="form-group">
<label for="name">Name</label>
<input type="text" class="form-control" name="name" pattern="\S+.*" [(ngModel)]="owner.name" required>
</div>
<button type="submit" class="btn btn-success float-left" [disabled]="!ownerForm.form.valid" (submit)="updateOwner()">Submit</button>
<a class="btn btn-light float-right" href="owner">Cancel</a>
</form>
</div>