(2010-) * @license GPLv2 https://files.froxlor.org/misc/COPYING.txt * @package Formfields */ use Froxlor\Settings; use Froxlor\System\Crypt; return [ 'mysql_edit' => [ 'title' => lng('mysql.database_edit'), 'image' => 'icons/mysql_edit.png', 'self_overview' => ['section' => 'mysql', 'page' => 'mysqls'], 'sections' => [ 'section_a' => [ 'title' => lng('mysql.database_edit'), 'image' => 'icons/mysql_edit.png', 'fields' => [ 'databasename' => [ 'label' => lng('mysql.databasename'), 'type' => 'label', 'value' => $result['databasename'] ], 'mysql_server' => [ 'visible' => count($mysql_servers) > 1, 'type' => 'hidden', 'value' => $result['dbserver'] ?? 0, ], 'mysql_server_info' => [ 'visible' => count($mysql_servers) > 1, 'label' => lng('mysql.mysql_server'), 'type' => 'label', 'disabled' => true, 'value' => $mysql_servers[$result['dbserver']] ?? 'unknown db server', ], 'description' => [ 'label' => lng('mysql.databasedescription'), 'type' => 'text', 'value' => $result['description'] ], 'mysql_password' => [ 'label' => lng('changepassword.new_password_ifnotempty'), 'type' => 'password', 'autocomplete' => 'new-password', 'next_to' => [ 'mysql_password_suggestion' => [ 'next_to_prefix' => lng('customer.generated_pwd') . ':', 'type' => 'text', 'visible' => (Settings::Get('panel.password_regex') == ''), 'value' => Crypt::generatePassword(), 'readonly' => true ] ] ] ] ] ] ] ];