<commit_before>.container
  .row
    .col-xs-12
      //- this needs to actually POST so that it can issue the redirect immediately
      form.form-horizontal(method="POST" action="/oauth/dialog/authorize/decision")
        fieldset
          legend Allow Application {{ O.appName }}

          div(ng-if="O.error.message")
            .alert.alert-danger {{ O.error.message }}
            .alert.alert-danger
              pre
                code {{ O.rawResponse | json }}
          div(ng-if="O.invalids.length")
            .alert.alert-danger
              span The application provided invalid scope.
              ul
                li(ng-repeat="invalid in O.invalids")
                  pre
                    code {{ invalid | json }}

          //- TODO auto-update on change
          input(type="hidden" name="transaction_id" ng-value="O.transactionId")
          input(type="hidden" name="accepted_scope" ng-value="O.acceptedScope")
          input(type="hidden" name="selected_account_id" ng-value="O.selectedAccountId")
          .form-group
            .col-xs-6
              span {{ O.selectedAccount.displayName || 'Error: No Display Name' }}
              br
              img(ng-src="{{ O.selectedAccount.avatar || '/images/avatar-64px.png' }}")
              .form-group(ng-if="O.accounts.length > 1")
                label
                  span Choose a different account
                select.form-control(
                  ng-model="O.selectedAccount"
                  ng-options="acc as acc.displayName for acc in O.accounts"
                  ng-change="O.updateScope()"
                )

            .col-xs-6
              span {{ O.client.title || 'Error: No App Title' }}
              br
              img(ng-src="{{ O.client.logo || '/images/app-icon-64px.png' }}")

            .col-xs-12
              .checkbox(ng-repeat="scope in O.deltaScope")
                label
                  input(
                    ng-change="O.updateScope()"
                    ng-model="scope.accepted"
                    type="checkbox"
                  )
                  |  {{ scope.name }}

            .form-group
              .col-lg-offset-10.col-lg-offset-2
                .col-xs-6
                  button.btn.btn-default(
                    name="cancel"
                    type="submit"
                    ng-disabled="O.invalids.length || O.error"
                  ) Cancel
                .col-xs-6
                  button.btn.btn-primary(
                    type="submit"
                    ng-disabled="O.invalids.length || O.error"
                  ) Allow<commit_msg>Cancel should cancel instead of allow :-D<commit_after>.container
  .row
    .col-xs-12
      //- this needs to actually POST so that it can issue the redirect immediately
      form.form-horizontal(method="POST" action="/oauth/dialog/authorize/decision")
        fieldset
          legend Allow Application {{ O.appName }}

          div(ng-if="O.error.message")
            .alert.alert-danger {{ O.error.message }}
            .alert.alert-danger
              pre
                code {{ O.rawResponse | json }}
          div(ng-if="O.invalids.length")
            .alert.alert-danger
              span The application provided invalid scope.
              ul
                li(ng-repeat="invalid in O.invalids")
                  pre
                    code {{ invalid | json }}

          //- TODO auto-update on change
          input(type="hidden" name="transaction_id" ng-value="O.transactionId")
          input(type="hidden" name="accepted_scope" ng-value="O.acceptedScope")
          input(type="hidden" name="selected_account_id" ng-value="O.selectedAccountId")
          .form-group
            .col-xs-6
              span {{ O.selectedAccount.displayName || 'Error: No Display Name' }}
              br
              img(ng-src="{{ O.selectedAccount.avatar || '/images/avatar-64px.png' }}")
              .form-group(ng-if="O.accounts.length > 1")
                label
                  span Choose a different account
                select.form-control(
                  ng-model="O.selectedAccount"
                  ng-options="acc as acc.displayName for acc in O.accounts"
                  ng-change="O.updateScope()"
                )

            .col-xs-6
              span {{ O.client.title || 'Error: No App Title' }}
              br
              img(ng-src="{{ O.client.logo || '/images/app-icon-64px.png' }}")

            .col-xs-12
              .checkbox(ng-repeat="scope in O.deltaScope")
                label
                  input(
                    ng-change="O.updateScope()"
                    ng-model="scope.accepted"
                    type="checkbox"
                  )
                  |  {{ scope.name }}

            .form-group
              .col-lg-offset-10.col-lg-offset-2
                .col-xs-6
                  input.btn.btn-default(
                    name="cancel"
                    value="Cancel"
                    type="submit"
                    ng-disabled="O.invalids.length || O.error"
                  )
                .col-xs-6
                  button.btn.btn-primary(
                    type="submit"
                    ng-disabled="O.invalids.length || O.error"
                  ) Allow
{'fraction_non_alphanumeric': 0.11927642736009045, 'fraction_numerical': 0.006029771999246278, 'mean_word_length': 1.2358887952822242, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '7344442', 'n_tokens_mistral': 1458, 'n_tokens_neox': 1361, 'n_words': 257}