Bootstrap Модальные фоны - PullRequest
       17

Bootstrap Модальные фоны

0 голосов
/ 27 февраля 2019

У меня есть 2 разных загрузочных модала на одной странице. Я бы хотел, чтобы 2 класса .modal-background вели себя по-разному.Как мне этого добиться?Вот пример кода:

<!-- Cancel Modal --> 
<div class="modal fade" id="cancelModal"
   tabindex="-1" role="dialog" aria-labelledby="cancelModal"
   aria-hidden="true">
   <div class="modal-dialog modal-dialog-centered" role="document">
      <div class="modal-content">
         <div class="modal-header">
            <h5 class="modal-title" id="cancelModalLabel">Cancel Warning</h5>
            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
            </button>
         </div>
         <div class="modal-body">
            Are you sure you want to cancel the form?
         </div>
         <div class="modal-footer">
            <button type="button" class="btn btn-secondary" data- 
               dismiss="modal">Close</button>
            <button type="button" class="btn btn-primary" 
               (click)="cancel()">Yes</button>
         </div>
      </div>
   </div>
</div>
<!-- Submit Modal -->   
<div class="modal fade" id="submitModal" tabindex="-1"
   role="dialog" aria-labelledby="submitModal" aria-hidden="true">
   <div class="modal-dialog modal-dialog-centered" role="document">
      <div class="modal-content">
         <div class="modal-header">
            <h5 class="modal-title" id="submitModalLabel">Submit Warning</h5>
            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
            </button>
         </div>
         <div class="modal-body">
            Are you sure you want to submit and close the form?
         </div>
         <div class="modal-footer">
            <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
            <button type="button" class="btn btn-primary" routerLink="/submission" 
               (click)="submitForm()">Yes</button>
         </div>
      </div>
   </div>
</div>
...