Fix that the sql port does not change when updating the type of the database

fixes #7491
This commit is contained in:
Johannes Meyer 2015-04-07 15:05:57 +02:00
parent 9596b4fdf7
commit dc4d1246a9
1 changed files with 6 additions and 4 deletions

View File

@ -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(