<commit_before>{{#if title}}
  <h1 class="screenreader-only" style="display: inline">{{title}}</h1>
{{else}}
  <h1 class="screenreader-only" style="display: inline">
  {{#if isAnnouncement}}
    {{#t}}New Announcement{{/t}}
  {{else}}
    {{#t}}New Discussion{{/t}}
  {{/if}}
  </h1>
{{/if}}

<div id="discussion-edit-view" class="ui-tabs-minimal">
{{#unless isAnnouncement}}
  <div id="discussion-edit-header" class="discussion-edit-header row-fluid">
    {{#if ENV.CONDITIONAL_RELEASE_SERVICE_ENABLED }}
      <ul id="discussion-edit-header-tabs">
       <li><a href="#discussion-details-tab" id="details_link">{{#t}}Details{{/t}}</a></li>
       <li><a href="#mastery-paths-editor" id="conditional_release_link">{{#t}}Mastery Paths{{/t}}</a></li>
       <span id="discussion-edit-header-spacer"></span>
       {{>  DiscussionTopics/publishedButton }}
      </ul>
    {{else}}
      <div class="span4 offset8 text-right">
        {{>  DiscussionTopics/publishedButton }}
      </div>
    </div>
    {{/if}}
{{/unless}}

<div id="discussion-details-tab">
  <fieldset>
    <div class="control-group">
      {{#if lockedItems.content}}
        <h1 id="discussion-title" class="title">{{title}}</h1>
        <input type="hidden" name="title" value="{{title}}"/>
      {{else}}
        <label class="hidden-inline-text" for="discussion-title">
          {{#t "topic_title"}}Topic Title{{/t}}
        </label>
        <input type="text"
               id="discussion-title"
               name="title"
               placeholder="{{#t "topic_title"}}Topic Title{{/t}}"
               value="{{title}}"
               maxlength="254"
               class="input-block-level">
      {{/if}}
    </div>
    <div class="control-group">
      {{#if lockedItems.content}}
        <div id="discussion-description" class="discussion-description">
          {{convertApiUserContent message}}
        </div>
      {{else}}
        <div style="float: right;">
          <a href="#" class="rte_switch_views_link">
            {{#t "#editor.switch_editor_html"}}HTML Editor{{/t}}
          </a>
          <a href="#" class="rte_switch_views_link" style="display:none;">
            {{#t "#editor.switch_editor_rich_text"}}Rich Content Editor{{/t}}
          </a>
        </div>
        <div style="clear:both;"></div>
        <textarea name="message"
                  class="input-block-level"
                  style="width: 100%; min-height: 200px;">
          {{convertApiUserContent message forEditing=1}}
        </textarea>
      {{/if}}
    </div>

  </fieldset>
  <fieldset>
    <div id="sections_autocomplete_root"></div>
    {{#if canAttach}}
    <div class="control-group">
      {{#if lockedItems.content}}
        <label class="control-label" {{#t "attachment"}}Attachment{{/t}}</label>
      {{else}}
        <label class="control-label"
          aria-label="{{#t}}Add Attachment{{/t}}"
          for="discussion_attachment_uploaded_data">
          {{#t "attachment"}}Attachment{{/t}}
        </label>
      {{/if}}
      <div class="controls">
        {{#each attachments}}
          <div class="attachmentRow">
            <a aria-label="attachment" href="{{url}}" class="{{mimeClass content-type}}">
              {{display_name}}
            </a>
            {{#unless ../lockedItems.content}}
              <button type="button"
                      class="close btn btn-link removeAttachment"
                      style="float:none"
                      aria-label="{{#t}}Remove Attachment{{/t}}">×</button>
            {{/unless}}
          </div>
        {{/each}}
        {{#unless lockedItems.content}}
          <input type="file"
                 name="attachment"
                 {{#if attachments}}style="display:none"{{/if}}
                 id="discussion_attachment_uploaded_data" >
        {{/unless}}
      </div>
    </div>
    {{/if}}
  </fieldset>

  <fieldset>

    {{#ifAny isTopic contextIsCourse canModerate showAssignment}}
    <div class="control-group">
      <div class="control-label">{{#t "options"}}Options{{/t}}</div>
      <div class="controls">
        {{#if isTopic}}
          <div><label class="checkbox short-label" for="threaded">
            {{checkbox "threaded"}}
            {{#t "allow_threaded_replies"}}Allow threaded replies{{/t}}
          </label></div>
        {{/if}}
        {{#if contextIsCourse}}
          {{#if isAnnouncement}}
            <div><label class="checkbox short-label" for="delay_posting">
              {{checkbox "delay_posting"
                checked=delayed_post_at
                class="element_toggler"
                aria-controls="discussion_topic_delay_post_container"}}
              {{#t "delay_posting"}}Delay posting{{/t}}
            </label></div>
            <label class="screenreader-only" id="discussion_topic_delay_post_accessible_label">
              {{#t}}Delay posting this topic until{{/t}}
              {{datepickerScreenreaderPrompt}}
            </label><commit_msg>make sure options text is a legend under fieldset for ann<commit_after>{{#if title}}
  <h1 class="screenreader-only" style="display: inline">{{title}}</h1>
{{else}}
  <h1 class="screenreader-only" style="display: inline">
  {{#if isAnnouncement}}
    {{#t}}New Announcement{{/t}}
  {{else}}
    {{#t}}New Discussion{{/t}}
  {{/if}}
  </h1>
{{/if}}

<div id="discussion-edit-view" class="ui-tabs-minimal">
{{#unless isAnnouncement}}
  <div id="discussion-edit-header" class="discussion-edit-header row-fluid">
    {{#if ENV.CONDITIONAL_RELEASE_SERVICE_ENABLED }}
      <ul id="discussion-edit-header-tabs">
       <li><a href="#discussion-details-tab" id="details_link">{{#t}}Details{{/t}}</a></li>
       <li><a href="#mastery-paths-editor" id="conditional_release_link">{{#t}}Mastery Paths{{/t}}</a></li>
       <span id="discussion-edit-header-spacer"></span>
       {{>  DiscussionTopics/publishedButton }}
      </ul>
    {{else}}
      <div class="span4 offset8 text-right">
        {{>  DiscussionTopics/publishedButton }}
      </div>
    </div>
    {{/if}}
{{/unless}}

<div id="discussion-details-tab">
  <fieldset>
    <div class="control-group">
      {{#if lockedItems.content}}
        <h1 id="discussion-title" class="title">{{title}}</h1>
        <input type="hidden" name="title" value="{{title}}"/>
      {{else}}
        <label class="hidden-inline-text" for="discussion-title">
          {{#t "topic_title"}}Topic Title{{/t}}
        </label>
        <input type="text"
               id="discussion-title"
               name="title"
               placeholder="{{#t "topic_title"}}Topic Title{{/t}}"
               value="{{title}}"
               maxlength="254"
               class="input-block-level">
      {{/if}}
    </div>
    <div class="control-group">
      {{#if lockedItems.content}}
        <div id="discussion-description" class="discussion-description">
          {{convertApiUserContent message}}
        </div>
      {{else}}
        <div style="float: right;">
          <a href="#" class="rte_switch_views_link">
            {{#t "#editor.switch_editor_html"}}HTML Editor{{/t}}
          </a>
          <a href="#" class="rte_switch_views_link" style="display:none;">
            {{#t "#editor.switch_editor_rich_text"}}Rich Content Editor{{/t}}
          </a>
        </div>
        <div style="clear:both;"></div>
        <textarea name="message"
                  class="input-block-level"
                  style="width: 100%; min-height: 200px;">
          {{convertApiUserContent message forEditing=1}}
        </textarea>
      {{/if}}
    </div>

  </fieldset>
  <fieldset>
    <div id="sections_autocomplete_root"></div>
    {{#if canAttach}}
    <div class="control-group">
      {{#if lockedItems.content}}
        <label class="control-label" {{#t "attachment"}}Attachment{{/t}}</label>
      {{else}}
        <label class="control-label"
          aria-label="{{#t}}Add Attachment{{/t}}"
          for="discussion_attachment_uploaded_data">
          {{#t "attachment"}}Attachment{{/t}}
        </label>
      {{/if}}
      <div class="controls">
        {{#each attachments}}
          <div class="attachmentRow">
            <a aria-label="attachment" href="{{url}}" class="{{mimeClass content-type}}">
              {{display_name}}
            </a>
            {{#unless ../lockedItems.content}}
              <button type="button"
                      class="close btn btn-link removeAttachment"
                      style="float:none"
                      aria-label="{{#t}}Remove Attachment{{/t}}">×</button>
            {{/unless}}
          </div>
        {{/each}}
        {{#unless lockedItems.content}}
          <input type="file"
                 name="attachment"
                 {{#if attachments}}style="display:none"{{/if}}
                 id="discussion_attachment_uploaded_data" >
        {{/unless}}
      </div>
    </div>
    {{/if}}
  </fieldset>

  <fieldset>

    {{#ifAny isTopic contextIsCourse canModerate showAssignment}}
    <legend class="control-label">{{#t "options"}}Options{{/t}}</legend>
    <div class="control-group">
      <div class="controls">
        {{#if isTopic}}
          <div><label class="checkbox short-label" for="threaded">
            {{checkbox "threaded"}}
            {{#t "allow_threaded_replies"}}Allow threaded replies{{/t}}
          </label></div>
        {{/if}}
        {{#if contextIsCourse}}
          {{#if isAnnouncement}}
            <div><label class="checkbox short-label" for="delay_posting">
              {{checkbox "delay_posting"
                checked=delayed_post_at
                class="element_toggler"
                aria-controls="discussion_topic_delay_post_container"}}
              {{#t "delay_posting"}}Delay posting{{/t}}
            </label></div>
            <label class="screenreader-only" id="discussion_topic_delay_post_accessible_label">
              {{#t}}Delay posting this topic until{{/t}}
              {{datepickerScreenreaderPrompt}}
            </label>
{'fraction_non_alphanumeric': 0.18394715772618095, 'fraction_numerical': 0.003602882305844676, 'mean_word_length': 2.363513968360821, 'pattern_counts': {'":': 0, '<': 163, '<?xml version=': 0, '>': 165, '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': '6980803', 'n_tokens_mistral': 3093, 'n_tokens_neox': 2962, 'n_words': 515}