YuiRestClient::Widget::CheckBox - handle checkboxes
Copyright 2020 SUSE LLC
SPDX-License-Identifier: FSFAP
QE Yam <qe-yam at suse de>
$self->{checkbox}->check();
$self->{checkbox}->is_checked();
$self->{checkbox}->toggle();
$self->{checkbox}->uncheck();
This class provides methods to interact with checkbox objects.
The JSON representation of a checkbox object on the server side looks like this:
{
"class": "YCheckBox",
"debug_label": "Change the Time Now",
"id": "change_now",
"label": "Chan&ge the Time Now",
"notify": true,
"value": true
}
check() - checks a checkbox
Set "value" to "true" in YCheckBox.
is_checked() - tests if a checkbox is checked.
Returns the value property, so "true" if the checkbox is checked.
toggle() - inverts the current state of the checkbox
Toggles the checkbox, therefore checked boxes become unchecked and viceversa.
uncheck() - unchecks a checkbox
The value property is set to "false".