<div class="modal" tabindex="-1" role="dialog">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" ng-click="$hide()">&times;</button>
        <h4 class="modal-title">{{title}}</h4>
      </div>
      <div class="modal-body">
        <p>Select a button to swap with.</p>
        <device-interface ng-model="popupDialog" current-state="ngModel" popup="true" has-page-btn="false" exists="exists"></device-interface>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-primary"  ng-disabled="!popupDialog.selectedBtn" ng-click="swapButtons(selectedBtn, popupDialog.selectedBtn)">Swap buttons</button>
        <button type="button" class="btn btn-danger" ng-click="$hide()">Cancel</button>
      </div>
    </div>
  </div>
</div>