Source
xxxxxxxxxx
(new CTextBox('saml_sso_url', $data['saml_sso_url'], false, DB::getFieldLength('config', 'saml_sso_url')))
<?php
/*
** Zabbix
** Copyright (C) 2001-2022 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
*/
$this->includeJsFile('administration.authentication.edit.js.php');
// Authentication general, HTTP authentication and password policy fields.
$auth_tab = (new CFormList('list_auth'))
->addRow(new CLabel(_('Default authentication'), 'authentication_type'),
(new CRadioButtonList('authentication_type', (int) $data['authentication_type']))
->setAttribute('autofocus', 'autofocus')
->addValue(_x('Internal', 'authentication'), ZBX_AUTH_INTERNAL)
->addValue(_('LDAP'), ZBX_AUTH_LDAP)
->setModern(true)
->removeId()
)
->addRow((new CTag('h4', true, _('Password policy')))->addClass('input-section-header'))
->addRow(new CLabel(_('Minimum password length'), 'passwd_min_length'),
(new CNumericBox('passwd_min_length', $data['passwd_min_length'], 2, false, false, false))
->setWidth(ZBX_TEXTAREA_NUMERIC_STANDARD_WIDTH)
)
->addRow(
new CLabel([_('Password must contain'),
makeHelpIcon([
_('Password requirements:'),
(new CList(
[
new CListItem([
_('must contain at least one lowercase and one uppercase Latin letter'),
' (', (new CSpan('A-Z'))->addClass(ZBX_STYLE_MONOSPACE_FONT), ', ',
(new CSpan('a-z'))->addClass(ZBX_STYLE_MONOSPACE_FONT), ')'
]),
new CListItem([
_('must contain at least one digit'),
' (', (new CSpan('0-9'))->addClass(ZBX_STYLE_MONOSPACE_FONT), ')'
]),
new CListItem([
_('must contain at least one special character'),
' (', (new CSpan(
' !"#$%&\'()*+,-./:;<=>?@[\]^_`{|}~'))->addClass(ZBX_STYLE_MONOSPACE_FONT
), ')'
])
]
))->addClass(ZBX_STYLE_LIST_DASHED)
])
]),
(new CList())
->addClass(ZBX_STYLE_LIST_CHECK_RADIO)
->addItem(
(new CCheckBox('passwd_check_rules[]', PASSWD_CHECK_CASE))
->setLabel(_('an uppercase and a lowercase Latin letter'))
->setChecked(($data['passwd_check_rules'] & PASSWD_CHECK_CASE) == PASSWD_CHECK_CASE)
->setUncheckedValue(0x00)
->setId('passwd_check_rules_case')
)
->addItem(
(new CCheckBox('passwd_check_rules[]', PASSWD_CHECK_DIGITS))
->setLabel(_('a digit'))
->setChecked(($data['passwd_check_rules'] & PASSWD_CHECK_DIGITS) == PASSWD_CHECK_DIGITS)
->setUncheckedValue(0x00)
->setId('passwd_check_rules_digits')
)
->addItem(
(new CCheckBox('passwd_check_rules[]', PASSWD_CHECK_SPECIAL))
->setLabel(_('a special character'))
->setChecked(($data['passwd_check_rules'] & PASSWD_CHECK_SPECIAL) == PASSWD_CHECK_SPECIAL)
->setUncheckedValue(0x00)
->setId('passwd_check_rules_special')
)