The default status of CInput("checkbox") can't be checked

XMLWordPrintable

    • Type: Incident report
    • Resolution: Won't fix
    • Priority: Trivial
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      Steps to reproduce:
      I added the following code to widget.view.php
      <?php
      $powerLabel = new CLabel("Power On/Off", "powerLabel");
      $powerLabel->addStyle("margin-left: 10px;");
      $powerLabel->addStyle("margin-right: 3px;");
      $powerCheckbox = new CInput("checkbox", "powerCheckbox", "on");
      $powerCheckbox->setId("powerCheckbox");
      $powerDiv = new CDiv([$powerLabel, $powerCheckbox]);
      $widgetView = new CWidgetView($data);
      $widgetView->addItem($powerDiv);
      $widgetView->show();

      Result:
      See screenshot...
      The default check status of powerCheckbox isn't checked.
      Expected:
      The default check status of powerCheckbox isn checked.
      See attached patch file...

            Assignee:
            Zabbix Development Team
            Reporter:
            snow uyl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: