Source
(new CNumericBox('minute', $data['form']['minute'], 2))->setWidth(ZBX_TEXTAREA_NUMERIC_STANDARD_WIDTH)
<?php
/*
** Zabbix
** Copyright (C) 2001-2023 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** 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 General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
/**
* @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[] = [