Fixed some strict messages on configuration page
Dieser Commit ist enthalten in:
Ursprung
87f951530e
Commit
c4a04c1812
2 geänderte Dateien mit 84 neuen und 83 gelöschten Zeilen
|
@ -536,10 +536,11 @@ class Application_Form_Config_Email extends Zend_Form_SubForm
|
||||||
* Extracts an multi array from flat element names and values
|
* Extracts an multi array from flat element names and values
|
||||||
*
|
*
|
||||||
* @param array $data The values to extract index and values from
|
* @param array $data The values to extract index and values from
|
||||||
|
* @param bool $suppressArrayNotation
|
||||||
*
|
*
|
||||||
* @return array The converted array
|
* @return array The converted array
|
||||||
*/
|
*/
|
||||||
public function getValidValues($data)
|
public function getValidValues($data, $suppressArrayNotation = false)
|
||||||
{
|
{
|
||||||
$values = parent::getValidValues($data, true);
|
$values = parent::getValidValues($data, true);
|
||||||
$newArray = array();
|
$newArray = array();
|
||||||
|
@ -566,11 +567,11 @@ class Application_Form_Config_Email extends Zend_Form_SubForm
|
||||||
/**
|
/**
|
||||||
* Set default values
|
* Set default values
|
||||||
*
|
*
|
||||||
* @param $defaults
|
* @param array $defaults
|
||||||
*
|
*
|
||||||
* @return Zend_Form
|
* @return Zend_Form
|
||||||
*/
|
*/
|
||||||
public function setDefaults($defaults)
|
public function setDefaults(array $defaults)
|
||||||
{
|
{
|
||||||
if (isset($defaults['email']['RecipientCc'])) {
|
if (isset($defaults['email']['RecipientCc'])) {
|
||||||
$recipientCc = array();
|
$recipientCc = array();
|
||||||
|
|
|
@ -22,6 +22,7 @@ class Application_Form_Config_Ftp extends Zend_Form_SubForm
|
||||||
* @var Msd_Language
|
* @var Msd_Language
|
||||||
*/
|
*/
|
||||||
protected $_lang;
|
protected $_lang;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Init form and add all elements
|
* Init form and add all elements
|
||||||
*
|
*
|
||||||
|
@ -29,7 +30,7 @@ class Application_Form_Config_Ftp extends Zend_Form_SubForm
|
||||||
*/
|
*/
|
||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
$config = Msd_Registry::getConfig();
|
$config = Msd_Registry::getConfig();
|
||||||
$this->_lang = Msd_Language::getInstance();
|
$this->_lang = Msd_Language::getInstance();
|
||||||
$this->setDisableLoadDefaultDecorators(true);
|
$this->setDisableLoadDefaultDecorators(true);
|
||||||
$this->setDecorators(array('SubForm'));
|
$this->setDecorators(array('SubForm'));
|
||||||
|
@ -40,8 +41,8 @@ class Application_Form_Config_Ftp extends Zend_Form_SubForm
|
||||||
$this->setDisplayGroupDecorators(array('DisplayGroup'));
|
$this->setDisplayGroupDecorators(array('DisplayGroup'));
|
||||||
$this->_addButtonFtpAdd();
|
$this->_addButtonFtpAdd();
|
||||||
|
|
||||||
$ftpConfig = $config->getParam('ftp');
|
$ftpConfig = $config->getParam('ftp');
|
||||||
$ftpKeys = array_keys($ftpConfig);
|
$ftpKeys = array_keys($ftpConfig);
|
||||||
$nrOfFtpProfiles = count($ftpKeys);
|
$nrOfFtpProfiles = count($ftpKeys);
|
||||||
foreach ($ftpKeys as $ftpConnectionId) {
|
foreach ($ftpKeys as $ftpConnectionId) {
|
||||||
$this->_addRadioActivated($ftpConnectionId);
|
$this->_addRadioActivated($ftpConnectionId);
|
||||||
|
@ -78,8 +79,8 @@ class Application_Form_Config_Ftp extends Zend_Form_SubForm
|
||||||
'ftp' . $ftpConnectionId,
|
'ftp' . $ftpConnectionId,
|
||||||
array(
|
array(
|
||||||
'disableLoadDefaultDecorators' => true,
|
'disableLoadDefaultDecorators' => true,
|
||||||
'decorators' => array('DisplayGroup'),
|
'decorators' => array('DisplayGroup'),
|
||||||
'legend' => $legend,
|
'legend' => $legend,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -97,14 +98,14 @@ class Application_Form_Config_Ftp extends Zend_Form_SubForm
|
||||||
'headElement',
|
'headElement',
|
||||||
array(
|
array(
|
||||||
'disableLoadDefaultDecorators' => true,
|
'disableLoadDefaultDecorators' => true,
|
||||||
'content' =>
|
'content' =>
|
||||||
$this->getView()->getIcon('plus') . ' ' .
|
$this->getView()->getIcon('plus') . ' ' .
|
||||||
$this->_lang->getTranslator()->_('L_FTP_ADD_CONNECTION'),
|
$this->_lang->getTranslator()->_('L_FTP_ADD_CONNECTION'),
|
||||||
'decorators' => array('Default'),
|
'decorators' => array('Default'),
|
||||||
'escape' => false,
|
'escape' => false,
|
||||||
'label' => '',
|
'label' => '',
|
||||||
'class' => 'Formbutton',
|
'class' => 'Formbutton',
|
||||||
'onclick' => "addFtpConnection();",
|
'onclick' => "addFtpConnection();",
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -122,16 +123,16 @@ class Application_Form_Config_Ftp extends Zend_Form_SubForm
|
||||||
'radio',
|
'radio',
|
||||||
'ftp_' . $index . '_use',
|
'ftp_' . $index . '_use',
|
||||||
array(
|
array(
|
||||||
'class' => 'radio toggler',
|
'class' => 'radio toggler',
|
||||||
'label' => 'L_FTP_TRANSFER',
|
'label' => 'L_FTP_TRANSFER',
|
||||||
'onclick' => "myToggle(this, 'y', 'ftpToggle" . $index . "');",
|
'onclick' => "myToggle(this, 'y', 'ftpToggle" . $index . "');",
|
||||||
'listsep' => ' ',
|
'listsep' => ' ',
|
||||||
'disableLoadDefaultDecorators' => true,
|
'disableLoadDefaultDecorators' => true,
|
||||||
'multiOptions' => array(
|
'multiOptions' => array(
|
||||||
'y' => 'L_ACTIVATED',
|
'y' => 'L_ACTIVATED',
|
||||||
'n' => 'L_NOT_ACTIVATED',
|
'n' => 'L_NOT_ACTIVATED',
|
||||||
),
|
),
|
||||||
'decorators' => array('Default'),
|
'decorators' => array('Default'),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -149,14 +150,14 @@ class Application_Form_Config_Ftp extends Zend_Form_SubForm
|
||||||
'text',
|
'text',
|
||||||
'ftp_' . $index . '_timeout',
|
'ftp_' . $index . '_timeout',
|
||||||
array(
|
array(
|
||||||
'class' => 'text ftpToggle' . $index,
|
'class' => 'text ftpToggle' . $index,
|
||||||
'label' => 'L_FTP_TIMEOUT',
|
'label' => 'L_FTP_TIMEOUT',
|
||||||
'secondLabel' => 'L_SECONDS',
|
'secondLabel' => 'L_SECONDS',
|
||||||
'disableLoadDefaultDecorators' => true,
|
'disableLoadDefaultDecorators' => true,
|
||||||
'size' => 3,
|
'size' => 3,
|
||||||
'maxlength' => 3,
|
'maxlength' => 3,
|
||||||
'decorators' => array('DoubleLabel'),
|
'decorators' => array('DoubleLabel'),
|
||||||
'validators' => array('Digits'),
|
'validators' => array('Digits'),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -174,13 +175,13 @@ class Application_Form_Config_Ftp extends Zend_Form_SubForm
|
||||||
'checkbox',
|
'checkbox',
|
||||||
'ftp_' . $index . '_passiveMode',
|
'ftp_' . $index . '_passiveMode',
|
||||||
array(
|
array(
|
||||||
'class' => 'checkbox ftpToggle' . $index,
|
'class' => 'checkbox ftpToggle' . $index,
|
||||||
'label' => 'L_FTP_CHOOSE_MODE',
|
'label' => 'L_FTP_CHOOSE_MODE',
|
||||||
'secondLabel' => 'L_FTP_PASSIVE',
|
'secondLabel' => 'L_FTP_PASSIVE',
|
||||||
'disableLoadDefaultDecorators' => true,
|
'disableLoadDefaultDecorators' => true,
|
||||||
'checkedValue' => 'y',
|
'checkedValue' => 'y',
|
||||||
'uncheckedValue' => 'n',
|
'uncheckedValue' => 'n',
|
||||||
'decorators' => array('DoubleLabel'),
|
'decorators' => array('DoubleLabel'),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -198,13 +199,13 @@ class Application_Form_Config_Ftp extends Zend_Form_SubForm
|
||||||
'checkbox',
|
'checkbox',
|
||||||
'ftp_' . $index . '_ssl',
|
'ftp_' . $index . '_ssl',
|
||||||
array(
|
array(
|
||||||
'class' => 'checkbox ftpToggle' . $index,
|
'class' => 'checkbox ftpToggle' . $index,
|
||||||
'label' => 'L_FTP_SSL',
|
'label' => 'L_FTP_SSL',
|
||||||
'secondLabel' => 'L_FTP_USESSL',
|
'secondLabel' => 'L_FTP_USESSL',
|
||||||
'disableLoadDefaultDecorators' => true,
|
'disableLoadDefaultDecorators' => true,
|
||||||
'checkedValue' => 'y',
|
'checkedValue' => 'y',
|
||||||
'uncheckedValue' => 'n',
|
'uncheckedValue' => 'n',
|
||||||
'decorators' => array('DoubleLabel'),
|
'decorators' => array('DoubleLabel'),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -222,10 +223,10 @@ class Application_Form_Config_Ftp extends Zend_Form_SubForm
|
||||||
'text',
|
'text',
|
||||||
'ftp_' . $index . '_server',
|
'ftp_' . $index . '_server',
|
||||||
array(
|
array(
|
||||||
'class' => 'text ftpToggle' . $index,
|
'class' => 'text ftpToggle' . $index,
|
||||||
'label' => 'L_FTP_SERVER',
|
'label' => 'L_FTP_SERVER',
|
||||||
'disableLoadDefaultDecorators' => true,
|
'disableLoadDefaultDecorators' => true,
|
||||||
'decorators' => array('Default'),
|
'decorators' => array('Default'),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -233,17 +234,18 @@ class Application_Form_Config_Ftp extends Zend_Form_SubForm
|
||||||
'text',
|
'text',
|
||||||
'ftp_' . $index . '_port',
|
'ftp_' . $index . '_port',
|
||||||
array(
|
array(
|
||||||
'class' => 'text ftpToggle' . $index,
|
'class' => 'text ftpToggle' . $index,
|
||||||
'label' => 'L_FTP_PORT',
|
'label' => 'L_FTP_PORT',
|
||||||
'disableLoadDefaultDecorators' => true,
|
'disableLoadDefaultDecorators' => true,
|
||||||
'size' => 4,
|
'size' => 4,
|
||||||
'maxlength' => 5,
|
'maxlength' => 5,
|
||||||
'validators' => array('Digits'),
|
'validators' => array('Digits'),
|
||||||
'decorators' => array('Default'),
|
'decorators' => array('Default'),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
|
/**
|
||||||
* Add input "user"
|
* Add input "user"
|
||||||
*
|
*
|
||||||
* @param int $index
|
* @param int $index
|
||||||
|
@ -256,11 +258,11 @@ class Application_Form_Config_Ftp extends Zend_Form_SubForm
|
||||||
'text',
|
'text',
|
||||||
'ftp_' . $index . '_user',
|
'ftp_' . $index . '_user',
|
||||||
array(
|
array(
|
||||||
'class' => 'text ftpToggle' . $index,
|
'class' => 'text ftpToggle' . $index,
|
||||||
'label' => 'L_FTP_USER',
|
'label' => 'L_FTP_USER',
|
||||||
'disableLoadDefaultDecorators' => true,
|
'disableLoadDefaultDecorators' => true,
|
||||||
'size' => 60,
|
'size' => 60,
|
||||||
'decorators' => array('Default'),
|
'decorators' => array('Default'),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -268,12 +270,12 @@ class Application_Form_Config_Ftp extends Zend_Form_SubForm
|
||||||
'password',
|
'password',
|
||||||
'ftp_' . $index . '_pass',
|
'ftp_' . $index . '_pass',
|
||||||
array(
|
array(
|
||||||
'class' => 'text ftpToggle' . $index,
|
'class' => 'text ftpToggle' . $index,
|
||||||
'label' => 'L_FTP_PASS',
|
'label' => 'L_FTP_PASS',
|
||||||
'disableLoadDefaultDecorators' => true,
|
'disableLoadDefaultDecorators' => true,
|
||||||
'size' => 60,
|
'size' => 60,
|
||||||
'decorators' => array('Default'),
|
'decorators' => array('Default'),
|
||||||
'renderPassword' => true,
|
'renderPassword' => true,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -291,11 +293,11 @@ class Application_Form_Config_Ftp extends Zend_Form_SubForm
|
||||||
'text',
|
'text',
|
||||||
'ftp_' . $index . '_dir',
|
'ftp_' . $index . '_dir',
|
||||||
array(
|
array(
|
||||||
'class' => 'text ftpToggle' . $index,
|
'class' => 'text ftpToggle' . $index,
|
||||||
'label' => 'L_DIR',
|
'label' => 'L_DIR',
|
||||||
'disableLoadDefaultDecorators' => true,
|
'disableLoadDefaultDecorators' => true,
|
||||||
'size' => 60,
|
'size' => 60,
|
||||||
'decorators' => array('Default'),
|
'decorators' => array('Default'),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -322,14 +324,14 @@ class Application_Form_Config_Ftp extends Zend_Form_SubForm
|
||||||
'ftpCheck' . $index,
|
'ftpCheck' . $index,
|
||||||
array(
|
array(
|
||||||
'disableLoadDefaultDecorators' => true,
|
'disableLoadDefaultDecorators' => true,
|
||||||
'content' =>
|
'content' =>
|
||||||
$this->getView()->getIcon('Connect', '', 16) . ' ' .
|
$this->getView()->getIcon('Connect', '', 16) . ' ' .
|
||||||
$this->_lang->getTranslator()->_('L_TESTCONNECTION'),
|
$this->_lang->getTranslator()->_('L_TESTCONNECTION'),
|
||||||
'decorators' => array($buttonDecorator),
|
'decorators' => array($buttonDecorator),
|
||||||
'escape' => false,
|
'escape' => false,
|
||||||
'label' => '',
|
'label' => '',
|
||||||
'class' => 'Formbutton ftpToggle' . $index,
|
'class' => 'Formbutton ftpToggle' . $index,
|
||||||
'onclick' => "testFtpConnection(" . $index . ");",
|
'onclick' => "testFtpConnection(" . $index . ");",
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -338,14 +340,14 @@ class Application_Form_Config_Ftp extends Zend_Form_SubForm
|
||||||
'ftpDelete' . $index,
|
'ftpDelete' . $index,
|
||||||
array(
|
array(
|
||||||
'disableLoadDefaultDecorators' => true,
|
'disableLoadDefaultDecorators' => true,
|
||||||
'content' =>
|
'content' =>
|
||||||
$this->getView()->getIcon('delete') . ' '
|
$this->getView()->getIcon('delete') . ' '
|
||||||
. $this->_lang->getTranslator()->_('L_FTP_CONNECTION_DELETE'),
|
. $this->_lang->getTranslator()->_('L_FTP_CONNECTION_DELETE'),
|
||||||
'decorators' => array('LineEnd'),
|
'decorators' => array('LineEnd'),
|
||||||
'escape' => false,
|
'escape' => false,
|
||||||
'label' => '',
|
'label' => '',
|
||||||
'class' => 'Formbutton',
|
'class' => 'Formbutton',
|
||||||
'onclick' => "deleteFtpConnection(" . $index . ");",
|
'onclick' => "deleteFtpConnection(" . $index . ");",
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -354,12 +356,12 @@ class Application_Form_Config_Ftp extends Zend_Form_SubForm
|
||||||
* Get valid values
|
* Get valid values
|
||||||
*
|
*
|
||||||
* @param array $data
|
* @param array $data
|
||||||
|
* @param bool $suppressArrayNotation
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getValidValues($data)
|
public function getValidValues($data, $suppressArrayNotation = false)
|
||||||
{
|
{
|
||||||
//$values = parent::getValidValues($data, true);
|
|
||||||
$ftpData = array();
|
$ftpData = array();
|
||||||
foreach ($data as $key => $value) {
|
foreach ($data as $key => $value) {
|
||||||
if (substr($key, 0, 4) != 'ftp_') {
|
if (substr($key, 0, 4) != 'ftp_') {
|
||||||
|
@ -370,9 +372,7 @@ class Application_Form_Config_Ftp extends Zend_Form_SubForm
|
||||||
$ftpData[$ftpId] = array();
|
$ftpData[$ftpId] = array();
|
||||||
}
|
}
|
||||||
$ftpData[$ftpId][$ftpKey] = $value;
|
$ftpData[$ftpId][$ftpKey] = $value;
|
||||||
//unset($values[$key]);
|
|
||||||
}
|
}
|
||||||
//var_dump($ftpData); die();
|
|
||||||
return $ftpData;
|
return $ftpData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -383,7 +383,7 @@ class Application_Form_Config_Ftp extends Zend_Form_SubForm
|
||||||
*
|
*
|
||||||
* @return Zend_Form
|
* @return Zend_Form
|
||||||
*/
|
*/
|
||||||
public function setDefaults($defaults)
|
public function setDefaults(array $defaults)
|
||||||
{
|
{
|
||||||
if (!empty($defaults['ftp'])) {
|
if (!empty($defaults['ftp'])) {
|
||||||
$ftp = array();
|
$ftp = array();
|
||||||
|
|
Laden …
In neuem Issue referenzieren