<commit_before>(function () {
'use strict';

angular
  .module('Mobidul')
  .directive('mblInputCode', InputCode);

InputCode.$inject = [
  '$log',
  '$rootScope'
];

function InputCode (
  $log,
  $rootScope
) {
  return {
    restrict: 'E',
    scope: {
      verifier: '@',
      success: '@',
      error: '@'
    },
    template: "<div><form ng-submit='ctrl.submit()'><md-input-container><input ng-model='ctrl.input' data-success='success' data-error='error'</input></md-input-container><md-button type='submit' class='md-raised md-primary'>Go</md-button></form></div>",

    link: function ($scope, $element, $attrs, ctrl) {
      // ...
    },

    controller: function ($scope, $element, $attrs) {
      var ctrl = this;

      ctrl.submit = submit;

      function submit () {

        if (ctrl.input) {
          if (ctrl.input.toLowerCase() == $scope.verifier.toLowerCase()) {
            $rootScope.$broadcast('action', $scope.success);
          } else {
            $rootScope.$broadcast('action', $scope.error);
          }
        }<commit_msg>Code revision InputCode element (refs #24)<commit_after>(function () {
'use strict';

angular
  .module('Mobidul')
  .directive('mblInputCode', InputCode);

InputCode.$inject = [
  '$log', '$rootScope'
];

function InputCode (
  $log, $rootScope
) {
  return {
    restrict: 'E',
    scope: {
      verifier: '@',
      success: '@',
      error: '@'
    },
    template: (
      '<div>' +
        '<form ng-submit="ctrl.submit()">' +
          '<md-input-container>' +
            '<input ' +
              'ng-model="ctrl.input" ' +
              'data-success="success" ' +
              'data-error="error">' +
            '</input>' +
          '</md-input-container>' +

          '<md-button ' +
            'type="submit" ' +
            'class="md-raised md-primary"' +
          '>Go</md-button>'
        '</form>'
      '</div>'
    ),

    link: function ($scope, $element, $attrs, ctrl) {
      // ...
    },

    controller: function ($scope, $element, $attrs) {
      var ctrl = this;

      ctrl.submit = submit;

      function submit () {
        if (ctrl.input) {
          if ( ctrl.input.toLowerCase() == $scope.verifier.toLowerCase() ) {
            $rootScope.$broadcast('action', $scope.success);
          } else {
            $rootScope.$broadcast('action', $scope.error);
          }
        }
{'fraction_non_alphanumeric': 0.1907563025210084, 'fraction_numerical': 0.0008403361344537816, 'mean_word_length': 2.108355091383812, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 22, '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': '678369', 'n_tokens_mistral': 754, 'n_tokens_neox': 753, 'n_words': 130}