<commit_before>'use strict';

let angular = require('angular');

require('./confirmationModal.less');

module.exports = angular
  .module('spinnaker.core.confirmationModal.controller', [
    require('angular-ui-bootstrap'),
    require('../application/modal/platformHealthOverride.directive.js'),
    require('../task/monitor/taskMonitorService.js'),
  ])
  .controller('ConfirmationModalCtrl', function($scope, $modalInstance, taskMonitorService, params) {
    $scope.params = params;

    $scope.state = {
      submitting: false
    };

    if (params.taskMonitorConfig) {
      params.taskMonitorConfig.modalInstance = $modalInstance;

      $scope.taskMonitor = taskMonitorService.buildTaskMonitor(params.taskMonitorConfig);
    }

    $scope.verification = {
      required: !!params.account || (params.verificationLabel && params.textToVerify !== undefined),
      toVerify: params.textToVerify,
    };

    this.formDisabled = () => !$scope.verification.verified;

    function showError(exception) {<commit_msg>allow submitting confirmation modals when no account provided<commit_after>'use strict';

let angular = require('angular');

require('./confirmationModal.less');

module.exports = angular
  .module('spinnaker.core.confirmationModal.controller', [
    require('angular-ui-bootstrap'),
    require('../application/modal/platformHealthOverride.directive.js'),
    require('../task/monitor/taskMonitorService.js'),
  ])
  .controller('ConfirmationModalCtrl', function($scope, $modalInstance, taskMonitorService, params) {
    $scope.params = params;

    $scope.state = {
      submitting: false
    };

    if (params.taskMonitorConfig) {
      params.taskMonitorConfig.modalInstance = $modalInstance;

      $scope.taskMonitor = taskMonitorService.buildTaskMonitor(params.taskMonitorConfig);
    }

    $scope.verification = {
      required: !!params.account || (params.verificationLabel && params.textToVerify !== undefined),
      toVerify: params.textToVerify,
    };

    this.formDisabled = () => $scope.verification.required && !$scope.verification.verified;

    function showError(exception) {
{'fraction_non_alphanumeric': 0.13820754716981132, 'fraction_numerical': 0.0, 'mean_word_length': 4.276119402985074, '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': '6274308', 'n_tokens_mistral': 586, 'n_tokens_neox': 578, 'n_words': 88}