1
0
Fork 0

Solved the problem with the unclosed table data. Merged the solutions.

Dieser Commit ist enthalten in:
Harald-Innetzberger 2011-08-23 15:08:40 +00:00
Ursprung fa559edcdf
Commit 6093094d2e

Datei anzeigen

@ -51,10 +51,6 @@ class Application_Form_Config_Ftp extends Zend_Form_SubForm
$this->_addInputServerAndPort($ftpConnectionId); $this->_addInputServerAndPort($ftpConnectionId);
$this->_addInputUserAndPass($ftpConnectionId); $this->_addInputUserAndPass($ftpConnectionId);
$this->_addInputPath($ftpConnectionId); $this->_addInputPath($ftpConnectionId);
$this->_addButtonsTestAndDelete($ftpConnectionId);
$legend = $this->_lang->getTranslator()->_('L_FTP_CONNECTION')
. ' ' . ($ftpConnectionId + 1);
if ($nrOfFtpProfiles > 1) { if ($nrOfFtpProfiles > 1) {
$buttonDelete = 'ftpDelete' . $ftpConnectionId; $buttonDelete = 'ftpDelete' . $ftpConnectionId;
@ -62,6 +58,11 @@ class Application_Form_Config_Ftp extends Zend_Form_SubForm
$buttonDelete = ''; $buttonDelete = '';
} }
$this->_addButtonsTestAndDelete($ftpConnectionId, $buttonDelete);
$legend = $this->_lang->getTranslator()->_('L_FTP_CONNECTION')
. ' ' . ($ftpConnectionId + 1);
$this->addDisplayGroup( $this->addDisplayGroup(
array( array(
'ftp_' . $ftpConnectionId . '_use', 'ftp_' . $ftpConnectionId . '_use',
@ -303,13 +304,21 @@ class Application_Form_Config_Ftp extends Zend_Form_SubForm
/** /**
* Add Button "Test connection" * Add Button "Test connection"
* Add Button "Delete connection"
* *
* @param int $index * @param int $index
* @param string $buttonDelete
* *
* @return void * @return void
*/ */
private function _addButtonsTestAndDelete($index) private function _addButtonsTestAndDelete($index, $buttonDelete)
{ {
if (!empty($buttonDelete)) {
$buttonDecorator = 'LineStart';
} else {
$buttonDecorator = 'Default';
}
$this->addElement( $this->addElement(
'button', 'button',
'ftpCheck' . $index, 'ftpCheck' . $index,
@ -318,7 +327,7 @@ class Application_Form_Config_Ftp extends Zend_Form_SubForm
'content' => 'content' =>
$this->getView()->getIcon('Connect', '', 16) . ' ' . $this->getView()->getIcon('Connect', '', 16) . ' ' .
$this->_lang->getTranslator()->_('L_TESTCONNECTION'), $this->_lang->getTranslator()->_('L_TESTCONNECTION'),
'decorators' => array('LineStart'), 'decorators' => array($buttonDecorator),
'escape' => false, 'escape' => false,
'label' => '', 'label' => '',
'class' => 'Formbutton ftpToggle' . $index, 'class' => 'Formbutton ftpToggle' . $index,