<commit_before><header>
  <h2>Split case {{ ::case.reference }}</h2>
</header>

<div class="SummaryBlock">
  <div class="SummaryBlock-content Grid">
    <p class="Grid-row cf">
      <span class="Grid-col Grid-col--1-3 u-alignRight">Category of law</span>
      <span class="Grid-col Grid-col--2-3">{{ ::provider_category.name }}</span>
    </p>
    <p class="Grid-row cf">
      <span class="Grid-col Grid-col--1-3 u-alignRight">Matter type</span>
      <span class="Grid-col Grid-col--2-3">
        {{ ::case.matter_type1 }}
        <br>{{ ::case.matter_type2 }}
      </span>
    </p>
    <p class="Grid-row cf">
      <span class="Grid-col Grid-col--1-3 u-alignRight">Assigned to</span>
      <span class="Grid-col Grid-col--2-3">{{ ::user.provider.name }}</span>
    </p>
  </div>
</div>

<form method="post" name="split_case_frm">
  <h2>New case</h2>

  <div class="FormBlock FormBlock--yellow Grid">
    <label class="FormRow Grid-row cf">
      <span class="Grid-col Grid-col--1-3">
        <span class="FormRow-label FormRow-label--inline FormRow-label--right">Category of law</span>
      </span>

      <span class="Grid-col Grid-col--2-3">
        <span class="cf">
          <select name="category" class="FormRow-field--full" placeholder="Choose category of law" ui-select2 ng-model="::$parent.category" ng-options="cat.code as cat.name for cat in categories track by cat.code" required server-error>
            <option value=""></option>
          </select>
        </span>

        <span class="Error-message" ng-if="split_case_frm.category.$error.server">{{ errors.category }}</span>
      </span>
    </label>

    <label class="FormRow Grid-row cf">
      <span class="Grid-col Grid-col--1-3 u-alignRight">
        <span class="FormRow-label FormRow-label--inline FormRow-label--right">Matter type 1</span>
      </span>

      <span class="Grid-col Grid-col--2-3">
        <span class="cf">
          <select ui-select2 name="matter_type1" placeholder="Choose matter type 1" class="FormRow-field--inline FormRow-field--full" ng-model="::$parent.matterType1" ng-options="matterType.code as (matterType.code + ' - ' + matterType.description) for matterType in matterTypes | filter:{level: 1} track by matterType.code" ng-disabled="!matterTypes.length" ng-required="matterTypes.length" server-error>
            <option value=""></option>
          </select>
        </span>

        <span class="Error-message" ng-if="split_case_frm.matter_type1.$error.server">Matter type 1: {{ errors.matter_type1 }}</span>
      </span>
    </label>

    <label class="FormRow Grid-row cf">
      <span class="Grid-col Grid-col--1-3 u-alignRight">
        <span class="FormRow-label FormRow-label--inline FormRow-label--right">Matter type 2</span>
      </span>

      <span class="Grid-col Grid-col--2-3">
        <span class="cf">
          <select ui-select2 name="matter_type2" placeholder="Choose matter type 2" class="FormRow-field--inline FormRow-field--full" ng-model="::$parent.matterType2" ng-options="matterType.code as (matterType.code + ' - ' + matterType.description) for matterType in matterTypes | filter:{level: 2} track by matterType.code" ng-disabled="!matterTypes.length" ng-required="matterTypes.length" server-error>
            <option value=""></option>
          </select>
        </span>

        <span class="Error-message" ng-if="split_case_frm.matter_type2.$error.server">Matter type 2: {{ errors.matter_type2 }}</span>
      </span>
    </label>

    <label class="FormRow Grid-row cf">
      <span class="Grid-col Grid-col--1-3 u-alignRight">
        <span class="FormRow-label FormRow-label--inline FormRow-label--right">Notes</span>
      </span>

      <span class="Error-message" ng-if="split_case_frm.notes.$error.server">{{ errors.notes }}</span>

      <span class="Grid-col Grid-col--2-3">
        <textarea name="notes" cols="30" rows="4" ng-model="::$parent.notes" placeholder="Enter comments"></textarea>
      </span>
    </label>

    <fieldset class="FormRow FormRow--group FormRow--groupNarrow Grid-row cf">
      <span class="Grid-col Grid-col--1-3 u-alignRight">
        <span class="FormRow-label FormRow-label--inline FormRow-label--right">Assign</span>
      </span>

      <span class="Error-message" ng-if="split_case_frm.notes.$error.server">{{ errors.notes }}</span>

      <span class="Grid-col Grid-col--2-3">
        <span class="FormRow">
          <label class="FormRow-label">
            <input type="radio" name="internal" value="true" ng-model="::$parent.internal" required>
            <span class="FormRow-labelText">
              Internally to {{ ::user.provider.name }}
              <span class="Error-message" ng-if="errors.internal">{{ errors.internal }}</span>
            </span>
          </label>
        </span>
        <span class="FormRow">
          <label class="FormRow-label">
            <input type="radio" name="internal" value="false" ng-model="::$parent.internal" required>
            <span class="FormRow-labelText">To operator for assignment</span>
          </label>
        </span>

        <span class="Error-message" ng-if="split_case_frm.internal.$error.required && submitted">You must choose who to assign the case to</span>
      </span>
    </fieldset>
  </div>

  <div class="FormActions">
    <p class="Error-message" ng-if="errors.__all__">{{ errors.__all__ }}</p>

    <button class="Button" name="save-split-case" type="submit" ng-click="doSplit(split_case_frm)">Split case</button>
    <a href="" ng-click="cancel()">Cancel</a>
  </div>
</form>
<commit_msg>allow providers can split cases<commit_after><header>
  <h2>Split case {{ ::case.reference }}</h2>
</header>

<div class="SummaryBlock">
  <div class="SummaryBlock-content Grid">
    <p class="Grid-row cf">
      <span class="Grid-col Grid-col--1-3 u-alignRight">Category of law</span>
      <span class="Grid-col Grid-col--2-3">{{ ::provider_category.name }}</span>
    </p>
    <p class="Grid-row cf">
      <span class="Grid-col Grid-col--1-3 u-alignRight">Matter type</span>
      <span class="Grid-col Grid-col--2-3">
        {{ ::case.matter_type1 }}
        <br>{{ ::case.matter_type2 }}
      </span>
    </p>
    <p class="Grid-row cf">
      <span class="Grid-col Grid-col--1-3 u-alignRight">Assigned to</span>
      <span class="Grid-col Grid-col--2-3">{{ ::user.provider.name }}</span>
    </p>
  </div>
</div>

<form method="post" name="split_case_frm">
  <h2>New case</h2>

  <div class="FormBlock FormBlock--yellow Grid">
    <label class="FormRow Grid-row cf">
      <span class="Grid-col Grid-col--1-3">
        <span class="FormRow-label FormRow-label--inline FormRow-label--right">Category of law</span>
      </span>

      <span class="Grid-col Grid-col--2-3">
        <span class="cf">
          <select ui-select2 name="category" class="FormRow-field--full" placeholder="Choose category of law" ng-model="::$parent.$parent.category" ng-options="cat.code as cat.name for cat in categories track by cat.code" required server-error>
            <option value=""></option>
          </select>
        </span>

        <span class="Error-message" ng-if="split_case_frm.category.$error.server">{{ errors.category }}</span>
      </span>
    </label>

    <label class="FormRow Grid-row cf">
      <span class="Grid-col Grid-col--1-3 u-alignRight">
        <span class="FormRow-label FormRow-label--inline FormRow-label--right">Matter type 1</span>
      </span>

      <span class="Grid-col Grid-col--2-3">
        <span class="cf">
          <select ui-select2 name="matter_type1" placeholder="Choose matter type 1" class="FormRow-field--inline FormRow-field--full" ng-model="::$parent.$parent.matterType1" ng-options="matterType.code as (matterType.code + ' - ' + matterType.description) for matterType in matterTypes | filter:{level: 1} track by matterType.code" ng-disabled="!matterTypes.length" ng-required="matterTypes.length" server-error>
            <option value=""></option>
          </select>
        </span>

        <span class="Error-message" ng-if="split_case_frm.matter_type1.$error.server">Matter type 1: {{ errors.matter_type1 }}</span>
      </span>
    </label>

    <label class="FormRow Grid-row cf">
      <span class="Grid-col Grid-col--1-3 u-alignRight">
        <span class="FormRow-label FormRow-label--inline FormRow-label--right">Matter type 2</span>
      </span>

      <span class="Grid-col Grid-col--2-3">
        <span class="cf">
          <select ui-select2 name="matter_type2" placeholder="Choose matter type 2" class="FormRow-field--inline FormRow-field--full" ng-model="::$parent.$parent.matterType2" ng-options="matterType.code as (matterType.code + ' - ' + matterType.description) for matterType in matterTypes | filter:{level: 2} track by matterType.code" ng-disabled="!matterTypes.length" ng-required="matterTypes.length" server-error>
            <option value=""></option>
          </select>
        </span>

        <span class="Error-message" ng-if="split_case_frm.matter_type2.$error.server">Matter type 2: {{ errors.matter_type2 }}</span>
      </span>
    </label>

    <label class="FormRow Grid-row cf">
      <span class="Grid-col Grid-col--1-3 u-alignRight">
        <span class="FormRow-label FormRow-label--inline FormRow-label--right">Notes</span>
      </span>

      <span class="Error-message" ng-if="split_case_frm.notes.$error.server">{{ errors.notes }}</span>

      <span class="Grid-col Grid-col--2-3">
        <textarea name="notes" cols="30" rows="4" ng-model="::$parent.$parent.notes" placeholder="Enter comments"></textarea>
      </span>
    </label>

    <fieldset class="FormRow FormRow--group FormRow--groupNarrow Grid-row cf">
      <span class="Grid-col Grid-col--1-3 u-alignRight">
        <span class="FormRow-label FormRow-label--inline FormRow-label--right">Assign</span>
      </span>

      <span class="Error-message" ng-if="split_case_frm.notes.$error.server">{{ errors.notes }}</span>

      <span class="Grid-col Grid-col--2-3">
        <span class="FormRow">
          <label class="FormRow-label">
            <input type="radio" name="internal" value="true" ng-model="::$parent.$parent.internal" required>
            <span class="FormRow-labelText">
              Internally to {{ ::user.provider.name }}
              <span class="Error-message" ng-if="errors.internal">{{ errors.internal }}</span>
            </span>
          </label>
        </span>
        <span class="FormRow">
          <label class="FormRow-label">
            <input type="radio" name="internal" value="false" ng-model="::$parent.$parent.internal" required>
            <span class="FormRow-labelText">To operator for assignment</span>
          </label>
        </span>

        <span class="Error-message" ng-if="split_case_frm.internal.$error.required && submitted">You must choose who to assign the case to</span>
      </span>
    </fieldset>
  </div>

  <div class="FormActions">
    <p class="Error-message" ng-if="errors.__all__">{{ errors.__all__ }}</p>

    <button class="Button" name="save-split-case" type="submit" ng-click="doSplit(split_case_frm)">Split case</button>
    <a href="" ng-click="cancel()">Cancel</a>
  </div>
</form>

{'fraction_non_alphanumeric': 0.17964285714285713, 'fraction_numerical': 0.010714285714285714, 'mean_word_length': 3.027687882056814, 'pattern_counts': {'":': 12, '<': 261, '<?xml version=': 0, '>': 261, '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': '4370721', 'n_tokens_mistral': 3643, 'n_tokens_neox': 3544, 'n_words': 728}