<form>
  <div class="modal-head">
    {{#eq action 'activate'}}
      <h2>{{t 'coding_rules.activate_in_quality_profile'}} ({{state.total}} {{t 'coding_rules._rules'}})</h2>
    {{/eq}}
    {{#eq action 'deactivate'}}
      <h2>{{t 'coding_rules.deactivate_in_quality_profile'}} ({{state.total}} {{t 'coding_rules._rules'}})</h2>
    {{/eq}}
  </div>

  <div class="modal-body modal-body-select2">
    <div class="js-modal-messages"></div>

    <div class="modal-field">
      <h3>
        <label for="coding-rules-bulk-change-profile">
          {{#eq action 'activate'}}{{t 'coding_rules.activate_in'}}{{/eq}}
          {{#eq action 'deactivate'}}{{t 'coding_rules.deactivate_in'}}{{/eq}}
        </label>
      </h3>
      {{#if qualityProfile}}
        <h3 class="readonly-field">
          {{qualityProfileName}}{{#notEq action 'change-severity'}} — {{t 'are_you_sure'}}{{/notEq}}
        </h3>
      {{else}}
        <select id="coding-rules-bulk-change-profile" multiple>
          {{#each availableQualityProfiles}}
            <option value="{{key}}" {{#ifLength ../availableQualityProfiles 1}}selected{{/ifLength}}>
              {{name}} - {{language}}
            </option>
          {{/each}}
        </select>
      {{/if}}
    </div>
  </div>

  <div class="modal-foot">
    <button id="coding-rules-submit-bulk-change">{{t 'apply'}}</button>
    <a class="js-modal-close" href="#">{{t 'close'}}</a>
  </div>
</form>
