Source
.attr('src', 'imgstore.php?&width=<?= ZBX_ICON_PREVIEW_WIDTH ?>&height=<?= ZBX_ICON_PREVIEW_HEIGHT ?>&iconid=' + $(this).val())
<?php
/*
** Zabbix
** 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 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
*/
?>
<script type="text/x-jquery-tmpl" id="iconMapRowTPL">
<?=
(new CRow([
(new CCol(
(new CDiv())->addClass(ZBX_STYLE_DRAG_ICON)
))->addClass(ZBX_STYLE_TD_DRAG_ICON),
(new CSpan('#0:'))->addClass('rowNum'),
(new CSelect('iconmap[mappings][#{iconmappingid}][inventory_link]'))
->addOptions(CSelect::createOptionsFromArray($data['inventory_list']))
->setId('iconmap_mappings_#{iconmappingid}_inventory_link'),
(new CTextBox('iconmap[mappings][#{iconmappingid}][expression]', '', false, 64))
->setId('iconmap_mappings_#{iconmappingid}_expression')
->setAriaRequired()
->setWidth(ZBX_TEXTAREA_SMALL_WIDTH),
(new CSelect('iconmap[mappings][#{iconmappingid}][iconid]'))
->addOptions(CSelect::createOptionsFromArray($data['icon_list']))
->setId('iconmap_mappings_#{iconmappingid}_iconid')
->addClass('js-mapping-icon'),
(new CCol(
(new CImg('imgstore.php?iconid='.$data['default_imageid'].'&width='.ZBX_ICON_PREVIEW_WIDTH.
'&height='.ZBX_ICON_PREVIEW_HEIGHT, _('Preview'))
)
->setAttribute('data-image-full', 'imgstore.php?iconid='.$data['default_imageid'])
->addClass(ZBX_STYLE_CURSOR_POINTER)
->addClass('preview')
))->addStyle('vertical-align: middle'),
(new CCol(
(new CButton('remove', _('Remove')))
->addClass(ZBX_STYLE_BTN_LINK)
->addClass('remove_mapping')
->removeId()
))->addClass(ZBX_STYLE_NOWRAP)
]))
->setId('iconmapidRow_#{iconmappingid}')
->addClass('sortable')
?>
</script>