<commit_before>{{!
    Copyright (C) 2017 Google Inc.
    Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
}}

<div {{#instance}}{{data 'model'}}{{/instance}} {{ (el) -> el.ggrc_controllers_quick_form({instance : el.data('model') }) }}>
  {{#if isInProgressOrNotStarted}}
    {{^if hasErrors}}
      {{#unless isDisabled}}
        {{#if hasVerifiers}}
            <button class="btn btn-small btn-primary pull-right btn-info-pin-header"
                    data-name="status"
                    data-value="Ready for Review">
                Complete</button>
        {{else}}
            <button class="btn btn-small btn-primary pull-right btn-info-pin-header"
                    data-name="status"
                    data-value="Completed">Complete</button>
        {{/if}}
      {{/unless}}
    {{else}}
        <button class="btn btn-small btn-primary pull-right btn-info-pin-header disabled" {{#if errorMsg }}title="{{errorMsg}}"{{/if}}>Complete</button>
    {{/if}}
  {{/if}}
  {{#if isInReview}}
    {{#if isCurrentUserVerifier}}
      {{#unless hasErrors}}
          <button class="btn btn-small btn-success pull-right btn-info-pin-header"
                  data-name="status"
                  data-value="Verified">Verify
          </button>
          <button class="btn btn-small btn-danger pull-right btn-info-pin-header"
                  data-name="status"
                  data-value="In Progress">Reject
          </button>
      {{else}}
          <button class="btn btn-small btn-success pull-right btn-info-pin-header disabled"
                  data-name="status"
                  data-value="Verified"
                  title="{{errorMsg}}">Verify
          </button>
          <button class="btn btn-small btn-danger pull-right btn-info-pin-header disabled"
                  data-name="status"
                  data-value="In Progress"
                  title="{{errorMsg}}">Reject
          </button>
      {{/unless}}
    {{/if}}
  {{/if}}
  {{#unless isInProgress}}
    {{#instance._undo.0}}
        <a data-name="status" data-value="{{instance._undo.0}}" data-undo="true"
           class="undo btn btn-small btn-link btn-info-pin-header pull-right {{#if isDisabled}}disabled{{/if}}">Undo</a>
    {{/instance._undo.0}}
  {{/unless}}
</div><commit_msg>Fix changing status on tab switching in assessment<commit_after>{{!
    Copyright (C) 2017 Google Inc.
    Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
}}

<div {{#instance}}{{data 'model'}}{{/instance}} {{ (el) -> el.ggrc_controllers_quick_form({instance : el.data('model') }) }}>
  {{#unless isDisabled}}
    {{#if isInProgressOrNotStarted}}
      {{^if hasErrors}}
        {{#if hasVerifiers}}
            <button class="btn btn-small btn-primary pull-right btn-info-pin-header"
                    data-name="status"
                    data-value="Ready for Review">
                Complete</button>
        {{else}}
            <button class="btn btn-small btn-primary pull-right btn-info-pin-header"
                    data-name="status"
                    data-value="Completed">Complete</button>
        {{/if}}
      {{else}}
          <button class="btn btn-small btn-primary pull-right btn-info-pin-header disabled" {{#if errorMsg }}title="{{errorMsg}}"{{/if}}>Complete</button>
      {{/if}}
    {{/if}}
    {{#if isInReview}}
      {{#if isCurrentUserVerifier}}
        {{#unless hasErrors}}
            <button class="btn btn-small btn-success pull-right btn-info-pin-header"
                    data-name="status"
                    data-value="Verified">Verify
            </button>
            <button class="btn btn-small btn-danger pull-right btn-info-pin-header"
                    data-name="status"
                    data-value="In Progress">Reject
            </button>
        {{else}}
            <button class="btn btn-small btn-success pull-right btn-info-pin-header disabled"
                    data-name="status"
                    data-value="Verified"
                    title="{{errorMsg}}">Verify
            </button>
            <button class="btn btn-small btn-danger pull-right btn-info-pin-header disabled"
                    data-name="status"
                    data-value="In Progress"
                    title="{{errorMsg}}">Reject
            </button>
        {{/unless}}
      {{/if}}
    {{/if}}
    {{#unless isInProgress}}
      {{#instance._undo.0}}
          <a data-name="status" data-value="{{instance._undo.0}}" data-undo="true"
             class="undo btn btn-small btn-link btn-info-pin-header pull-right {{#if isDisabled}}disabled{{/if}}">Undo</a>
      {{/instance._undo.0}}
    {{/unless}}
  {{/unless}}
</div>
{'fraction_non_alphanumeric': 0.16374021578167972, 'fraction_numerical': 0.003807911994922784, 'mean_word_length': 2.0114649681528665, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '4268260', 'n_tokens_mistral': 1395, 'n_tokens_neox': 1344, 'n_words': 268}