<div class="billing-options-element">       
  <!-- Credit Card -->
  <div class="panel">
    <div class="panel-title">
      Credit Card
    </div>
    <div class="panel-body">
      <i class="fa fa-spinner fa-spin fa-2x" ng-show="!currentCard || changingCard"></i>
      <div class="current-card" ng-show="currentCard && !changingCard">
        <img src="{{ '/static/img/creditcards/' + getCreditImage(currentCard) }}" ng-show="currentCard.last4">
        <span class="no-card-outline" ng-show="!currentCard.last4"></span>

        <span class="last4" ng-show="currentCard.last4">****-****-****-<b>{{ currentCard.last4 }}</b></span>
        <span class="not-found" ng-show="!currentCard.last4">No credit card found</span>
      </div>

      <button class="btn btn-primary" ng-show="currentCard && !changingCard" ng-click="changeCard()">
        Change Credit Card
      </button>
    </div>
  </div>

  <!-- Options -->
  <div class="panel">
    <div class="panel-title">
      Billing Options
      <i class="fa fa-spinner fa-spin" ng-show="working"></i>
    </div>
    <div class="panel-body">
      <div class="settings-option">
        <input id="invoiceEmail" type="checkbox" ng-model="invoice_email">
        <label for="invoiceEmail">Send Receipt Emails</label>
        <div class="settings-description">
          If checked, a receipt email will be sent to {{ obj.email }} on every successful charge
        </div>
      </div>
    </div>
  </div>

  <!-- Modal message dialog -->
  <div class="modal fade" id="cannotchangecardModal">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
          <h4 class="modal-title">Cannot change credit card</h4>
        </div>
        <div class="modal-body">
          Your credit card could not be changed
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        </div>
      </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
  </div><!-- /.modal -->
</div>
