| | 1 | | <!-- Create Project Modal --> |
| | 2 | | @inject Services.ConferenceService conferenceService; |
| | 3 | |
|
| 0 | 4 | | @if (isVisible) |
| 0 | 5 | | { |
| | 6 | | <div class="modal fade show" style="display: block;" role="dialog"> |
| | 7 | | <div class="modal-dialog"> |
| | 8 | | <div class="modal-content"> |
| | 9 | | <div class="modal-header"> |
| 0 | 10 | | <h4 class="modal-title">@Title</h4> |
| | 11 | | <button type="button" class="btn-close" @onclick="Hide"></button> |
| | 12 | | </div> |
| | 13 | | <div class="modal-body"> |
| | 14 | | <div class="alert alert-danger"> |
| 0 | 15 | | <h5><i class="oi oi-info"></i> @Title</h5> |
| 0 | 16 | | <p>@Warning</p> |
| | 17 | | </div> |
| | 18 | | </div> |
| | 19 | | <div class="modal-footer"> |
| | 20 | | <button class="btn btn-white" @onclick="this.Hide">Close</button> |
| | 21 | | <button class="btn btn-danger" @onclick="this.Confirm" >Bestätigen</button> |
| | 22 | | </div> |
| | 23 | | </div> |
| | 24 | | </div> |
| | 25 | | </div> |
| | 26 | | <div class="modal-backdrop fade show"></div> |
| 0 | 27 | | } |
| | 28 | |
|
| | 29 | |
|
| | 30 | | @code { |
| 0 | 31 | | private bool isVisible = false; |
| | 32 | |
|
| 0 | 33 | | [Parameter] public string Title { get; set; } |
| | 34 | |
|
| 0 | 35 | | [Parameter] public string Warning { get; set; } |
| | 36 | |
|
| 0 | 37 | | [Parameter] public Task OnAccepted { get; set; } |
| | 38 | |
|
| | 39 | | public void Show(string title, string warning) |
| 0 | 40 | | { |
| 0 | 41 | | isVisible = true; |
| 0 | 42 | | this.Title = title; |
| 0 | 43 | | this.Warning = warning; |
| 0 | 44 | | StateHasChanged(); |
| 0 | 45 | | } |
| | 46 | |
|
| | 47 | | public void Hide() |
| 0 | 48 | | { |
| 0 | 49 | | isVisible = false; |
| 0 | 50 | | } |
| | 51 | |
|
| | 52 | | private void Confirm() |
| 0 | 53 | | { |
| 0 | 54 | | OnAccepted.Start(); |
| 0 | 55 | | this.Hide(); |
| 0 | 56 | | } |
| | 57 | | } |