| | 636 | class gui_checkbox extends guiinput { |
|---|
| | 637 | function gui_checkbox($elemname, $checked=false, $prompttext='', $helptext='', $value='on', $post_text = '', $jsonclick = '', $disable=false) { |
|---|
| | 638 | $parent_class = get_parent_class($this); |
|---|
| | 639 | parent::$parent_class($elemname, '', $prompttext, $helptext); |
|---|
| | 640 | |
|---|
| | 641 | $itemchecked = $checked ? 'checked' : ''; |
|---|
| | 642 | $disable_state = $disable ? 'disabled="true"' : ''; |
|---|
| | 643 | $js_onclick_include = ($jsonclick != '') ? 'onclick="' . $jsonclick. '"' : ''; |
|---|
| | 644 | $tabindex = guielement::gettabindex(); |
|---|
| | 645 | |
|---|
| | 646 | $this->html_input = "<input type=\"checkbox\" name=\"$this->_elemname\" id=\"$this->_elemname\" $disable_state tabindex=$tabindex value=\"$value\" $js_onclick_include $itemchecked/>$post_text\n"; |
|---|
| | 647 | } |
|---|
| | 648 | } |
|---|
| | 649 | |
|---|