Externalize operation delete modal template.

This commit is contained in:
Alexis Lahouze 2018-06-14 21:18:51 +02:00
parent 6efe5a897c
commit b3f0199036
2 changed files with 23 additions and 22 deletions

View File

@ -0,0 +1,22 @@
<!-- vim: set tw=80 ts=2 sw=2 sts=2 : -->
<div class="modal-header">
<h3 class="modal-title" id="modal-title">Delete Operation #{{ operation.id }}</h3>
</div>
<div class="modal-body" id="modal-body">
<p>
Do you really want to delete operation #{{ operation.id }} with label:<br/>
{{ operation.label }}
</p>
</div>
<div class="modal-footer">
<button class="btn btn-danger" (click)="submit()">
Yes
</button>
<button class="btn btn-default" (click)="cancel()">
No
</button>
</div>

View File

@ -7,28 +7,7 @@ import { Operation } from './operation';
@Component({
selector: 'operation-delete-modal',
template: `
<div class="modal-header">
<h3 class="modal-title" id="modal-title">Delete Operation #{{ operation.id }}</h3>
</div>
<div class="modal-body" id="modal-body">
<p>
Do you really want to delete operation #{{ operation.id }} with label:<br/>
{{ operation.label }}
</p>
</div>
<div class="modal-footer">
<button class="btn btn-danger" (click)="submit()">
Yes
</button>
<button class="btn btn-default" (click)="cancel()">
No
</button>
</div>
`
templateUrl: './operationDeleteModal.component.html'
})
export class OperationDeleteModalComponent {
@Input() operation: Operation