lib/YuiRestClient/Widget/CheckBox.pm

NAME

YuiRestClient::Widget::CheckBox - handle checkboxes

COPYRIGHT

Copyright 2020 SUSE LLC

SPDX-License-Identifier: FSFAP

AUTHORS

QE Yam <qe-yam at suse de>

SYNOPSIS

$self->{checkbox}->check();
$self->{checkbox}->is_checked();
$self->{checkbox}->toggle();
$self->{checkbox}->uncheck();

DESCRIPTION

Overview

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
}

Class and object methods

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".