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
|
||||
|
@ -68,10 +69,11 @@ class DbResourceForm extends Form
|
|||
'number',
|
||||
'port',
|
||||
array(
|
||||
'required' => true,
|
||||
'label' => $this->translate('Port'),
|
||||
'description' => $this->translate('The port to use'),
|
||||
'value' => 3306
|
||||
'required' => true,
|
||||
'preserveDefault' => true,
|
||||
'label' => $this->translate('Port'),
|
||||
'description' => $this->translate('The port to use'),
|
||||
'value' => ! array_key_exists('db', $formData) || $formData['db'] === 'mysql' ? 3306 : 5432
|
||||
)
|
||||
);
|
||||
$this->addElement(
|
||||
|
|
Loading…
Reference in New Issue