Source
<?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
*/
?>
<script type="text/x-jquery-tmpl" id="row-expression-tmpl">
<?= (new CRow([
(new CSelect('expressions[#{rowNum}][expression_type]'))
->addClass('js-expression-type-select')
->setId('expressions_#{rowNum}_expression_type')
->addOptions(CSelect::createOptionsFromArray(CRegexHelper::expression_type2str())),
(new CTextBox('expressions[#{rowNum}][expression]', '', false, 255))
->setWidth(ZBX_TEXTAREA_MEDIUM_WIDTH)
->setAriaRequired(),
(new CSelect('expressions[#{rowNum}][exp_delimiter]'))
->addOptions(CSelect::createOptionsFromArray(CRegexHelper::expressionDelimiters()))
->setId('expressions_#{rowNum}_exp_delimiter')
->addClass('js-expression-delimiter-select')
->setDisabled(true)
->addStyle('display: none;'),
new CCheckBox('expressions[#{rowNum}][case_sensitive]'),
(new CCol(
(new CButton('expressions[#{rowNum}][remove]', _('Remove')))
->addClass(ZBX_STYLE_BTN_LINK)
->addClass('element-table-remove')
))->addClass(ZBX_STYLE_NOWRAP)
]))
->addClass('form_row')
->setAttribute('data-index', '#{rowNum}')
->toString()
?>
</script>
<script type="text/x-jquery-tmpl" id="test-table-row-tmpl">
<?= (new CRow([
'#{type}', '#{expression}', (new CSpan('#{result}'))->addClass('#{resultClass}')
]))
->addClass('test_row')
->toString()
?>
</script>
<script type="text/x-jquery-tmpl" id="test-combined-table-row-tmpl">
<?= (new CRow([
(new CCol(_('Combined result')))->setColspan(2), (new CSpan('#{result}'))->addClass('#{resultClass}')
]))
->addClass('test_row')