Require a port only for postgres connections

Screw it!

refs #9683
This commit is contained in:
Eric Lippmann 2015-09-07 17:01:09 +02:00
parent e45140dd86
commit 65e4d23d89

View File

@ -78,9 +78,11 @@ class DbResourceForm extends Form
'number', 'number',
'port', 'port',
array( array(
'preserveDefault' => true, 'description' => $this->translate('The port to use'),
'label' => $this->translate('Port'), 'label' => $this->translate('Port'),
'description' => $this->translate('The port to use') 'preserveDefault' => true,
'required' => isset($formData['db']) && $formData['db'] === 'pgsql',
'value' => isset($formData['db']) && $formData['db'] === 'pgsql' ? 5432 : null
) )
); );
$this->addElement( $this->addElement(