<commit_before><h2 class="page-title border">Promotions</h2>

<div ng-repeat="promo in conference.promotions">
  <div class="panel panel-default">
    <div class="panel-heading">
      <div class="row">
        <div class="col-md-3 col-md-push-9 text-right">
          <a href="" ng-click="openWell[promo.id] = !openWell[promo.id]"><i class="fa fa-inset fa-inset-reg-type" ng-class="{'fa-chevron-up': openWell[promo.id], 'fa-chevron-down': !openWell[promo.id]}"></i></a>
        </div>
        <div class="col-md-6 col-md-pull-3 stacked-spacing-col-md">
          <label>Code</label>
          <input type="text" class="form-control" ng-model="promo.code">
        </div>
        <div class="col-md-3 col-md-pull-3 stacked-spacing-col-md">
          <label>Discount Amount</label>
          <div class="input-group">
            <span class="input-group-addon"><i class="fa fa-usd"></i></span>
            <input type="text" class="form-control" ng-model="promo.amount">
          </div>
        </div>
      </div>
    </div>
    <div class="panel-body" collapse="!openWell[promo.id]">
      <button class="btn btn-xs btn-danger reg-type-delete" ng-click="$parent.conference.promotions.splice($index, 1)" type="button">
        <i class="fa fa-trash-o"></i> Delete<span class="hidden-xs"> Promotion Code</span>
      </button>
      <div class="row">
        <div class="col-md-6">
          <div class="input-group">
            <label>Description</label>
            <textarea class="form-control" ng-model="promo.description"></textarea>
          </div>

          <div class="input-group pt12">
            <label>Validity Range</label>
            <div class="row">
              <div class="col-sm-6 stacked-spacing-col-sm">
                <crs-datetimepicker model="promo.activationDate"></crs-datetimepicker>
              </div>
              <div class="col-sm-6 stacked-spacing-col-sm">
                <crs-datetimepicker model="promo.deactivationDate"></crs-datetimepicker>
              </div>
            </div>
          </div>
        </div>

        <div class="col-md-6">
          <h4>Registration Types</h4>
          <p class="text-muted">The promotion code will be applied to the following registration types:</p>
          <div class="checkbox" ng-repeat="type in conference.registrantTypes">
            <label>
              <input type="checkbox" ng-checked="$parent.promo.registrantTypeIds.indexOf(type.id) != -1" ng-click="promotionRegistrantTypeToggle($parent.promo.registrantTypeIds, type.id)">
              {{type.name}}
            </label>
          </div>

          <div class="input-group pt12">
            <div class="checkbox">
              <label>
                <input type="checkbox" ng-model="promo.applyToAllRegistrants">
                Apply discount to everyone in registration
              </label>
              <i class="question-popover fa fa-question-circle"
                 popover="Applies discount to all registrants in the registration, if applicable. If unchecked, discount will only be applied once per registration."
                 popover-trigger="mouseenter"
                 popover-append-to-body="true">
              </i>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

<a href="" ng-click="addPromotion()">
  <i class="fa fa-plus"></i> Add Promotion Code
</a>
<commit_msg>open promotions to ng-if<commit_after><h2 class="page-title border">Promotions</h2>

<div ng-repeat="promo in conference.promotions">
  <div class="panel panel-default">
    <div class="panel-heading">
      <div class="row">
        <div class="col-md-3 col-md-push-9 text-right">
          <a href="" ng-click="openWell[promo.id] = !openWell[promo.id]"><i class="fa fa-inset fa-inset-reg-type" ng-class="{'fa-chevron-up': openWell[promo.id], 'fa-chevron-down': !openWell[promo.id]}"></i></a>
        </div>
        <div class="col-md-6 col-md-pull-3 stacked-spacing-col-md">
          <label>Code</label>
          <input type="text" class="form-control" ng-model="promo.code">
        </div>
        <div class="col-md-3 col-md-pull-3 stacked-spacing-col-md">
          <label>Discount Amount</label>
          <div class="input-group">
            <span class="input-group-addon"><i class="fa fa-usd"></i></span>
            <input type="text" class="form-control" ng-model="promo.amount">
          </div>
        </div>
      </div>
    </div>
    <div class="panel-body" ng-if="openWell[promo.id]">
      <button class="btn btn-xs btn-danger reg-type-delete" ng-click="$parent.conference.promotions.splice($index, 1)" type="button">
        <i class="fa fa-trash-o"></i> Delete<span class="hidden-xs"> Promotion Code</span>
      </button>
      <div class="row">
        <div class="col-md-6">
          <div class="input-group">
            <label>Description</label>
            <textarea class="form-control" ng-model="promo.description"></textarea>
          </div>

          <div class="input-group pt12">
            <label>Validity Range</label>
            <div class="row">
              <div class="col-sm-6 stacked-spacing-col-sm">
                <crs-datetimepicker model="promo.activationDate"></crs-datetimepicker>
              </div>
              <div class="col-sm-6 stacked-spacing-col-sm">
                <crs-datetimepicker model="promo.deactivationDate"></crs-datetimepicker>
              </div>
            </div>
          </div>
        </div>

        <div class="col-md-6">
          <h4>Registration Types</h4>
          <p class="text-muted">The promotion code will be applied to the following registration types:</p>
          <div class="checkbox" ng-repeat="type in conference.registrantTypes">
            <label>
              <input type="checkbox" ng-checked="$parent.promo.registrantTypeIds.indexOf(type.id) != -1" ng-click="promotionRegistrantTypeToggle($parent.promo.registrantTypeIds, type.id)">
              {{type.name}}
            </label>
          </div>

          <div class="input-group pt12">
            <div class="checkbox">
              <label>
                <input type="checkbox" ng-model="promo.applyToAllRegistrants">
                Apply discount to everyone in registration
              </label>
              <i class="question-popover fa fa-question-circle"
                 popover="Applies discount to all registrants in the registration, if applicable. If unchecked, discount will only be applied once per registration."
                 popover-trigger="mouseenter"
                 popover-append-to-body="true">
              </i>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

<a href="" ng-click="addPromotion()">
  <i class="fa fa-plus"></i> Add Promotion Code
</a>

{'fraction_non_alphanumeric': 0.1635507139702635, 'fraction_numerical': 0.005888414544383925, 'mean_word_length': 2.1896713615023473, 'pattern_counts': {'":': 0, '<': 179, '<?xml version=': 0, '>': 179, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1351887', 'n_tokens_mistral': 2120, 'n_tokens_neox': 2054, 'n_words': 409}