<commit_before><dom-module id="br-checkbox-grouped">
<template>
  <div class="form_field">
    <input type="checkbox" id$="{{brId}}" on-click="_setModel" required$="{{required}}" checked$="{{checked}}">
    <label for$="{{brId}}">{{label}}</label>    
  </div>
</template>

<script>
  Polymer({
    is: 'br-checkbox-grouped',

    properties: {
      label: String,
      brId: String,
      model: {
        type: String,
        reflectToAttribute: true,
        value: 'false',
        observer: '_modelChanged'
      }
      required: Boolean
    },

    ready: function () {
      var formField = this.$$('.form_field');
      formField.classList.add('checkbox');
    },      

    _setModel: function (event) {
      this.model = event.target.checked.toString();
    },

    _modelChanged: function () {
      if (this.model == 'true') {
        this.checked = true;

        if (this.required)          
          this.isValidForm = true;
      }
      else {
        if (this.required)
          this.isValidForm = false;
      }
    }

  });
</script>
</dom-module><commit_msg>bugfix<commit_after><dom-module id="br-checkbox-grouped">
<template>
  <div class="form_field">
    <input type="checkbox" id$="{{brId}}" on-click="_setModel" required$="{{required}}" checked$="{{checked}}">
    <label for$="{{brId}}">{{label}}</label>    
  </div>
</template>

<script>
  Polymer({
    is: 'br-checkbox-grouped',

    properties: {
      label: String,
      brId: String,
      model: {
        type: String,
        reflectToAttribute: true,
        value: 'false',
        observer: '_modelChanged'
      },
      required: Boolean
    },

    ready: function () {
      var formField = this.$$('.form_field');
      formField.classList.add('checkbox');
    },      

    _setModel: function (event) {
      this.model = event.target.checked.toString();
    },

    _modelChanged: function () {
      if (this.model == 'true') {
        this.checked = true;

        if (this.required)          
          this.isValidForm = true;
      }
      else {
        if (this.required)
          this.isValidForm = false;
      }
    }

  });
</script>
</dom-module>
{'fraction_non_alphanumeric': 0.17128347183748846, 'fraction_numerical': 0.0, 'mean_word_length': 2.191458026509573, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, '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': '1049999', 'n_tokens_mistral': 681, 'n_tokens_neox': 670, 'n_words': 127}