<commit_before>{{#if (is-fulfilled allParents)}}
  <div class='breadcrumbs'>
    <span {{action 'clearVocabAndTerm'}}>{{t 'general.allVocabularies'}}</span>
    <span {{action manageTerm null}}>{{vocabulary.title}}</span>
    {{#each (await allParents) as |parent|}}
      <span {{action manageTerm parent.id}}>{{parent.title}}</span>
    {{/each}}
    <span>{{term.title}}</span>
  </div>
{{/if}}

{{#if term}}
  <div class='school-vocabulary-term-manager-properties'>
    <div class='block term-title'>
      <h4>{{t 'general.title'}}:</h4>
      {{#if canUpdate}}
        {{#editable-field
          value=(if title title (t 'general.clickToEdit'))
          save=(action 'changeTermTitle')
          close=(action 'revertTermTitleChanges')
          saveOnEnter=true
          closeOnEscape=true
        as |isSaving|
        }}
          <input
            value={{title}}
            oninput={{action (mut title) value="target.value"}}
            disabled={{isSaving}}
          >
        {{/editable-field}}
      {{else}}
        {{title}}
      {{/if}}
      {{#if (and canDelete (or (not term.hasChildren) (not term.hasAssociations)))}}
        {{fa-icon 'trash' class='clickable remove' click=(action 'deleteTerm')}}
      {{/if}}
    </div>
    <div class='block is-active'>
      <label>{{t 'general.active'}}:</label>
      {{#if canUpdate}}
        {{toggle-yesno
          yes=isActive
          disabled=(if changeIsActive.isRunning true false)
          toggle=(action (perform changeIsActive))
        }}
      {{else}}
        {{#if isActive}}
          {{t 'general.yes'}}
        {{else}}
          {{t 'general.no'}}
        {{/if}}
      {{/if}}
    </div>
    <div class='block term-description'>
      <label>{{t 'general.description'}}:</label>
      {{#if canUpdate}}
        {{#editable-field
          value=(if description description (t 'general.clickToAddTermDescription'))
          save=(action 'changeTermDescription')
          close=(action 'revertTermDescriptionChanges')<commit_msg>Prevent terms with associations from being deleted<commit_after>{{#if (is-fulfilled allParents)}}
  <div class='breadcrumbs'>
    <span {{action 'clearVocabAndTerm'}}>{{t 'general.allVocabularies'}}</span>
    <span {{action manageTerm null}}>{{vocabulary.title}}</span>
    {{#each (await allParents) as |parent|}}
      <span {{action manageTerm parent.id}}>{{parent.title}}</span>
    {{/each}}
    <span>{{term.title}}</span>
  </div>
{{/if}}

{{#if term}}
  <div class='school-vocabulary-term-manager-properties'>
    <div class='block term-title'>
      <h4>{{t 'general.title'}}:</h4>
      {{#if canUpdate}}
        {{#editable-field
          value=(if title title (t 'general.clickToEdit'))
          save=(action 'changeTermTitle')
          close=(action 'revertTermTitleChanges')
          saveOnEnter=true
          closeOnEscape=true
        as |isSaving|
        }}
          <input
            value={{title}}
            oninput={{action (mut title) value="target.value"}}
            disabled={{isSaving}}
          >
        {{/editable-field}}
      {{else}}
        {{title}}
      {{/if}}
      {{#if (and canDelete (not term.hasChildren) (not term.hasAssociations))}}
        {{fa-icon 'trash' class='clickable remove' click=(action 'deleteTerm')}}
      {{/if}}
    </div>
    <div class='block is-active'>
      <label>{{t 'general.active'}}:</label>
      {{#if canUpdate}}
        {{toggle-yesno
          yes=isActive
          disabled=(if changeIsActive.isRunning true false)
          toggle=(action (perform changeIsActive))
        }}
      {{else}}
        {{#if isActive}}
          {{t 'general.yes'}}
        {{else}}
          {{t 'general.no'}}
        {{/if}}
      {{/if}}
    </div>
    <div class='block term-description'>
      <label>{{t 'general.description'}}:</label>
      {{#if canUpdate}}
        {{#editable-field
          value=(if description description (t 'general.clickToAddTermDescription'))
          save=(action 'changeTermDescription')
          close=(action 'revertTermDescriptionChanges')
{'fraction_non_alphanumeric': 0.179009318293281, 'fraction_numerical': 0.000980872976949485, 'mean_word_length': 2.5163793103448278, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 49, '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': '2401602', 'n_tokens_mistral': 1250, 'n_tokens_neox': 1235, 'n_words': 248}