Source
(new CNumericBox('minute', $data['form']['minute'], 2))->setWidth(ZBX_TEXTAREA_NUMERIC_STANDARD_WIDTH)
<?php
/*
** Copyright (C) 2001-2025 Zabbix SIA
**
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
**
** This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
** without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
** See the GNU Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
/**
* @var CView $this
* @var array $data
*/
$form = (new CForm())
->setId('maintenance-timeperiod-form')
->setName('maintenance_timeperiod_form')
->addVar('row_index', $data['row_index'])
->addStyle('display: none;')
->addItem(getMessages());
// Enable form submitting on Enter.
$form->addItem((new CSubmitButton())->addClass(ZBX_STYLE_FORM_SUBMIT_HIDDEN));
$weekly_days_options = [];
$monthly_days_options = [];
foreach (range(0, 6) as $day) {
$value = 1 << $day;
$weekly_days_options[] = [
'label' => getDayOfWeekCaption($day + 1),
'value' => $value,
'checked' => $data['form']['timeperiod_type'] == TIMEPERIOD_TYPE_WEEKLY
&& ($value & $data['form']['dayofweek'])
];
$monthly_days_options[] = [
'label' => getDayOfWeekCaption($day + 1),
'value' => $value,
'checked' => $data['form']['timeperiod_type'] == TIMEPERIOD_TYPE_MONTHLY
&& ($value & $data['form']['dayofweek'])
];
}
$months_options = [];
foreach (range(0, 11) as $month) {
$value = 1 << $month;
$months_options[] = [
'label' => getMonthCaption($month + 1),
'value' => $value,
'checked' => $data['form']['timeperiod_type'] == TIMEPERIOD_TYPE_MONTHLY
&& ($value & $data['form']['month'])
];