<commit_before><div class="row">
  <ul class="nav nav-tabs">
    <li><h3>Add a resource type</h3></li>
    <li class="active link" ng-click="submit()"><span class="glyphicon glyphicon-ok"></span></li>
    <li class="cancel link" ng-click="close()"><span class="glyphicon glyphicon-remove"></span></li>
  </ul>

  <form name="form.resource-types" novalidate>
    <div class="form-group" ng-class="{'has-error': form.resource-types.name.$invalid}">
      <label for="name">Name</label>
      <input type="text" ng-model="type.name" name="name" class="form-control" placeholder="Must not be blank." required>
      <formfield-error-msg msg="Name should not be blank" field="form.resource-types.name" />
    </div>
    <div class="form-group" ng-class="{'has-error': form.resource-types.slug.$invalid}">
      <label for="slug">Slug</label>
      <input type="text" sp-slug-title="name" model="type" ng-model="type.slug" name="slug" class="form-control" placeholder="Must not be blank." required>
      <formfield-error-msg msg="Slug should not be blank" field="form.resource-types.slug" />
    </div>

    <div class="form-group" ng-class="{'has-error': form.resource-types.title_label.$invalid}">
      <label for="title_label">Title Label</label>
      <input type="text" ng-model="type.title_label" name="title_label" class="form-control" placeholder="Must not be blank." required>
      <formfield-error-msg msg="Slug should not be blank" field="form.resource-types.title_label" />
    </div>

    <div class="form-group">
      <div class="checkbox">
        <label>
          <input type="checkbox" ng-model="type.categories" ng-true-value="1" ng-false-value="0"> Allow categories?
        </label>
      </div>
    </div>

    <div class="form-group">
      <div class="checkbox">
        <label>
          <input type="checkbox" ng-model="type.tags" ng-true-value="1" ng-false-value="0"> Allow Tags?
        </label>
      </div>
    </div>

    <div class="btn-group form-group">
      <button type="button" class="btn btn-default dropdown-toggle btn-lg" data-toggle="dropdown">
        <span class="glyphicon glyphicon-plus"></span> Add Field
      </button>
      <ul class="dropdown-menu" role="menu">
        <li ng-repeat="fieldtype in fieldtypes"><a ng-click="addField(fieldtype)">{[fieldtype.name]}</a></li>
      </ul>
    </div>

    <div class="form-inline" ng-repeat="resource_field in type.resource_fields">
      <div class="checkbox">
        <label class="multiple-buttons" ng-click="removeField($index)"><span class="glyphicon glyphicon-minus-sign"></span>&nbsp;</label>
      </div>
      <div class="form-group">
        <label class="sr-only">Label</label>
        <input  type="text" ng-model="resource_field.label" class="form-control" placeholder="Field Label">
      </div>
      <div class="form-group">
        <label class="sr-only">Key</label>
        <input type="text" sp-slug-title="label" model="resource_field" ng-model="resource_field.slug" class="form-control" placeholder="Key - a unique identifier for this field">
      </div>
      <div class="checkbox">
        <label>
          <input type="checkbox" ng-model="resource_field.multiple" ng-true-value="1" ng-false-value="0"> Multiple?
        </label>
      </div>
      {[resource_field.multiple]}
      <div class="checkbox">
        <label>| Type: {[resource_field.field_type.name]}</label>
      </div>
    </div>
  </form>
</div><commit_msg>Enforcing multiple status of non-multiple fields<commit_after><div class="row">
  <ul class="nav nav-tabs">
    <li><h3>Add a resource type</h3></li>
    <li class="active link" ng-click="submit()"><span class="glyphicon glyphicon-ok"></span></li>
    <li class="cancel link" ng-click="close()"><span class="glyphicon glyphicon-remove"></span></li>
  </ul>

  <form name="form.resource-types" novalidate>
    <div class="form-group" ng-class="{'has-error': form.resource-types.name.$invalid}">
      <label for="name">Name</label>
      <input type="text" ng-model="type.name" name="name" class="form-control" placeholder="Must not be blank." required>
      <formfield-error-msg msg="Name should not be blank" field="form.resource-types.name" />
    </div>
    <div class="form-group" ng-class="{'has-error': form.resource-types.slug.$invalid}">
      <label for="slug">Slug</label>
      <input type="text" sp-slug-title="name" model="type" ng-model="type.slug" name="slug" class="form-control" placeholder="Must not be blank." required>
      <formfield-error-msg msg="Slug should not be blank" field="form.resource-types.slug" />
    </div>

    <div class="form-group" ng-class="{'has-error': form.resource-types.title_label.$invalid}">
      <label for="title_label">Title Label</label>
      <input type="text" ng-model="type.title_label" name="title_label" class="form-control" placeholder="Must not be blank." required>
      <formfield-error-msg msg="Slug should not be blank" field="form.resource-types.title_label" />
    </div>

    <div class="form-group">
      <div class="checkbox">
        <label>
          <input type="checkbox" ng-model="type.categories" ng-true-value="1" ng-false-value="0"> Allow categories?
        </label>
      </div>
    </div>

    <div class="form-group">
      <div class="checkbox">
        <label>
          <input type="checkbox" ng-model="type.tags" ng-true-value="1" ng-false-value="0"> Allow Tags?
        </label>
      </div>
    </div>

    <div class="btn-group form-group">
      <button type="button" class="btn btn-default dropdown-toggle btn-lg" data-toggle="dropdown">
        <span class="glyphicon glyphicon-plus"></span> Add Field
      </button>
      <ul class="dropdown-menu" role="menu">
        <li ng-repeat="fieldtype in fieldtypes"><a ng-click="addField(fieldtype)">{[fieldtype.name]}</a></li>
      </ul>
    </div>

    <div class="form-inline" ng-repeat="resource_field in type.resource_fields">
      <div class="checkbox">
        <label class="multiple-buttons" ng-click="removeField($index)"><span class="glyphicon glyphicon-minus-sign"></span>&nbsp;</label>
      </div>
      <div class="form-group">
        <label class="sr-only">Label</label>
        <input  type="text" ng-model="resource_field.label" class="form-control" placeholder="Field Label">
      </div>
      <div class="form-group">
        <label class="sr-only">Key</label>
        <input type="text" sp-slug-title="label" model="resource_field" ng-model="resource_field.slug" class="form-control" placeholder="Key - a unique identifier for this field">
      </div>


      <div class="checkbox" ng-show="resource_field.field_type.multiple">
        <label>
          <input type="checkbox" ng-model="resource_field.multiple" ng-true-value="1" ng-false-value="0"> Multiple? | 
        </label>
      </div>
      <div class="checkbox">
        <label>Type: {[resource_field.field_type.name]}</label>
      </div>
    </div>
  </form>
</div>
{'fraction_non_alphanumeric': 0.1860666378191259, 'fraction_numerical': 0.0023078032597721046, 'mean_word_length': 3.496757457846952, 'pattern_counts': {'":': 0, '<': 181, '<?xml version=': 0, '>': 181, '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': '4819844', 'n_tokens_mistral': 2212, 'n_tokens_neox': 2182, 'n_words': 441}