mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-05-28 04:36:06 -04:00
parent
6f44fb1139
commit
8afbb7385d
1 changed files with 20 additions and 1 deletions
|
|
@ -58,8 +58,27 @@ class DbResourcePage extends Form
|
|||
]
|
||||
);
|
||||
|
||||
$charsetElement = $this->getElement('charset');
|
||||
if (! isset($formData['db']) || $formData['db'] === 'mysql') {
|
||||
$this->getElement('charset')->setValue('utf8mb4');
|
||||
$charsetElement->setValue('utf8mb4')->addDecorator(
|
||||
['preserveDefault' => 'HtmlTag'],
|
||||
[
|
||||
'tag' => 'input',
|
||||
'type' => 'hidden',
|
||||
'name' => 'charset' . static::DEFAULT_SUFFIX,
|
||||
'value' => 'utf8mb4'
|
||||
]
|
||||
);
|
||||
} else {
|
||||
$charsetElement->addDecorator(
|
||||
['preserveDefault' => 'HtmlTag'],
|
||||
[
|
||||
'tag' => 'input',
|
||||
'type' => 'hidden',
|
||||
'name' => 'charset' . static::DEFAULT_SUFFIX,
|
||||
'value' => ''
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue