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',
|
||||
array(
|
||||
'required' => true,
|
||||
'autosubmit' => true,
|
||||
'label' => $this->translate('Database Type'),
|
||||
'description' => $this->translate('The type of SQL database'),
|
||||
'multiOptions' => $dbChoices
|
||||
|
@ -69,9 +70,10 @@ class DbResourceForm extends Form
|
|||
'port',
|
||||
array(
|
||||
'required' => true,
|
||||
'preserveDefault' => true,
|
||||
'label' => $this->translate('Port'),
|
||||
'description' => $this->translate('The port to use'),
|
||||
'value' => 3306
|
||||
'value' => ! array_key_exists('db', $formData) || $formData['db'] === 'mysql' ? 3306 : 5432
|
||||
)
|
||||
);
|
||||
$this->addElement(
|
||||
|
|
Loading…
Reference in New Issue