Source
_('You are not able to choose some of the languages, because locales for them are not installed on the web server.')
<?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
*/
$this->includeJsFile('administration.user.edit.common.js.php');
$this->includeJsFile(($data['action'] === 'user.edit')
? 'administration.user.edit.js.php'
: 'administration.userprofile.edit.js.php'
);
$html_page = new CHtmlPage();
if ($data['action'] === 'user.edit') {
$widget_name = _('Users');
$doc_url = CDocHelper::USERS_USER_EDIT;
$csrf_token = CCsrfTokenHelper::get('user');
}
else {
$widget_name = _('User profile').NAME_DELIMITER;
$widget_name .= ($data['name'] !== '' || $data['surname'] !== '')
? $data['name'].' '.$data['surname']
: $data['username'];
$html_page->setTitleSubmenu(getUserSettingsSubmenu());
$doc_url = CDocHelper::USERS_USERPROFILE_EDIT;
$csrf_token = CCsrfTokenHelper::get('userprofile');
}
$html_page
->setTitle($widget_name)
->setDocUrl(CDocHelper::getUrl($doc_url));
$tabs = new CTabView();
if ($data['form_refresh'] == 0) {
$tabs->setSelected(0);
}
if ($data['readonly'] == true) {
CMessageHelper::addWarning(
_('This user is IdP provisioned. Manual changes for provisioned fields are not allowed.')
);
show_messages();
}
// Create form.
$user_form = (new CForm())