title: checkbox label enabled disabled knockoutjs
body: <p>I have html form which is using knockout to manipulate enable/disable mode for controls. </p>
  
  <p>I have textbox control and checkbox control which are manipulated by a button, if the button is clicked then they can be edited, otherwise they are disabled.</p>
  
  <p>The problem is happening with the checkbox controls because they have label around which is adding enable/disabled class, so although the disabled property is removed from the checkbox control, the label still has the disabled property and can't be used.</p>
  
  <p>This is what I have:</p>
  
  <pre><code>&lt;table width="95%" data-bind="with: settings"&gt;
      &lt;tr&gt;
          &lt;td style="width:20%" valign="top"&gt;q1&lt;br /&gt;
              &lt;label class="label_yesno"&gt;
                  &lt;input type="checkbox" data-bind="checked: prop_2, enable: editMode" /&gt;
              &lt;/label&gt;
          &lt;/td&gt;
          &lt;td style="width:5%"&gt;&lt;/td&gt;
          &lt;td valign="top"&gt;q2&lt;br /&gt;
              &lt;label class="label_yesno"&gt;
                  &lt;input type="checkbox" data-bind="checked: prop_34, enable: editMode" /&gt;
              &lt;/label&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td valign="top"&gt;q3
                  &lt;br /&gt;
              &lt;label class="label_yesno"&gt;
                  &lt;input type="checkbox" data-bind="checked: prop_52, enable: editMode" /&gt;
              &lt;/label&gt;
          &lt;/td&gt;
          &lt;td&gt;&lt;/td&gt;
          &lt;td valign="top"&gt;q4:&lt;br /&gt;
              &lt;input type="text" style="width: 95%" data-bind="value: prop_12, enable: editMode" /&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  &lt;script runat="server"&gt;
  protected void Page_Load(object sender, EventArgs e)
  {
      string script = @"
      function settingsViewModel() { 
          return {
              prop_2: ko.observable(false),
              prop_12: ko.observable(''),
              prop_34: ko.observable(false),
              prop_52: ko.observable(false)
          };
      };";
      ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "settingsvm", script, true);
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>On initial load the controls are disabled:</p>
  
  <p><img src="https://i.stack.imgur.com/6f3wE.png" alt="enter image description here"></p>
  
  <p>When I click the edit button this is happening:</p>
  
  <p><img src="https://i.stack.imgur.com/lcGGw.png" alt="enter image description here"></p>
  
  <p>As you can see the disabled property is removed from the checkbox but not from the label which wraps the checkbox.</p>
  
  <p>Any idea how I can fix that? </p>