{% if not privacyConsentDialogHide %}
  <div class="modal" id="privacyConsentDialog" tabindex="-1" role="dialog" aria-labelledby="privacyConsentDialogTitle" data-role="privacy_consent_dialog" data-backdrop="false">
    <div class="modal-dialog"  role="document">
      <div class="modal-content">
        <form data-role="privacy_consent_dialog_form">
          <div class="modal-header">
            <h5 id="privacyConsentDialogTitle" class="modal-title">{{ 'msg.PrivacyConsentDialogTitle'|trans|raw }}</h5>
            <button type="button" class="close" data-dismiss="modal" aria-label="{{ 'lbl.Close'|trans }}">
              <span aria-hidden="true">&times;</span>
            </button>
          </div>
          <div class="modal-body">
            <p>{{ 'msg.PrivacyConsentDialogBefore'|trans|raw }}</p>

            <div class="form-group">
              <div class="custom-control custom-checkbox">
                <input name="privacyConsentLevelFunctionalCheckbox" id="privacyConsentLevelFunctionalCheckbox"
                  type="checkbox" checked disabled aria-describedby="privacyConsentLevelFunctionalHelpBlock"
                  data-role="privacy-level"
                  data-value="functional"
                  class="custom-control-input"
                >
                <label id="privacyConsentLevelFunctionalCheckbox" class="custom-control-label">
                  {{ 'msg.PrivacyConsentLevelFunctionalTitle'|trans|raw }}
                </label>
              </div>
              <small id="privacyConsentLevelFunctionalHelpBlock" class="form-text text-muted">
                {{ 'msg.PrivacyConsentLevelFunctionalText'|trans|raw }}
              </small>
            </div>

            {% for level in privacyConsentDialogLevels %}
              <div class="form-group">
                <div class="custom-control custom-checkbox">
                  <input name="privacyConsentLevel{{ level|ucfirst }}Checkbox"
                    id="privacyConsentLevel{{ level|ucfirst }}Checkbox" type="checkbox"
                    aria-describedby="privacyConsentLevel{{ level|ucfirst }}HelpBlock"
                    data-role="privacy-level"
                    data-value="{{ level }}"
                    class="custom-control-input"
                  >
                  <label id="privacyConsentLevel{{ level|ucfirst }}Checkbox" class="custom-control-label">
                    {{ ('msg.PrivacyConsentLevel' ~ level|ucfirst ~ 'Title')|trans|raw }}
                  </label>
                </div>
                <small id="privacyConsentLevel{{ level|ucfirst }}HelpBlock" class="form-text text-muted">
                  {{ ('msg.PrivacyConsentLevel' ~ level|ucfirst ~ 'Text')|trans|raw }}
                </small>
              </div>
            {% endfor %}
            <p>{{ 'msg.PrivacyConsentDialogAfter'|trans|raw }}</p>
          </div>
          <div class="modal-footer">
            <button type="submit" data-role="privacy_consent_dialog_save_button" class="btn btn-sm btn-primary">
              {{ 'msg.PrivacyConsentDialogSave'|trans }}
            </button>
          </div>
        </form>
      </div>
    </div>
  </div>
{% endif %}

Add consent dialog template for the bs5 theme
Add consent dialog template for the bs5 theme
