Bootstrap 3 Template

This is a simple Twitter Bootstrap 3 template. You can fork it to get a ready to use Bootstrap 3 fiddle.

by Zakaria Acharki

HTML

<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">
<a href='#' data-toggle='modal' data-target='#removeCandidateModal' onclick="removeCandidate()">Remove</a>
<div class="modal fade" id="removeCandidateModal">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title">Remove Candidate</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
      </div>
      <div class="modal-body" id="remove-candidates-modal-body">

      </div>
      <div class="modal-footer" id="remove-candidates-modal-footer">

      </div>
    </div>
  </div>
</div>

JavaScript

function removeCandidate() {
  let id = "45678";
  let name = "Bob";
  let election_type = "BHVC";

  document.getElementById('remove-candidates-modal-body').innerHTML = '<p>Are you sure you want to remove the following candidate<br> Candidate Name:' + name +
    '<br>Candidate ID:' +
    '<br>Elections:' + election_type + '</p>';
  document.getElementById('remove-candidates-modal-footer').innerHTML = '' +
    '<button type="button" class="btn btn-secondary" data-dismiss="modal">No</button>\n' +
    '                <button type="button" class="btn btn-primary" onclick=removeCandidateYes("' + id + '")>Yes</button>';
}