mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-23 13:54:26 +02:00
Fix that the sql port does not change when updating the type of the database
fixes #7491
This commit is contained in:
parent
9596b4fdf7
commit
dc4d1246a9
@ -49,6 +49,7 @@ class DbResourceForm extends Form
|
|||||||
'db',
|
'db',
|
||||||
array(
|
array(
|
||||||
'required' => true,
|
'required' => true,
|
||||||
|
'autosubmit' => true,
|
||||||
'label' => $this->translate('Database Type'),
|
'label' => $this->translate('Database Type'),
|
||||||
'description' => $this->translate('The type of SQL database'),
|
'description' => $this->translate('The type of SQL database'),
|
||||||
'multiOptions' => $dbChoices
|
'multiOptions' => $dbChoices
|
||||||
@ -68,10 +69,11 @@ class DbResourceForm extends Form
|
|||||||
'number',
|
'number',
|
||||||
'port',
|
'port',
|
||||||
array(
|
array(
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'label' => $this->translate('Port'),
|
'preserveDefault' => true,
|
||||||
'description' => $this->translate('The port to use'),
|
'label' => $this->translate('Port'),
|
||||||
'value' => 3306
|
'description' => $this->translate('The port to use'),
|
||||||
|
'value' => ! array_key_exists('db', $formData) || $formData['db'] === 'mysql' ? 3306 : 5432
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$this->addElement(
|
$this->addElement(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user