From d8c714ce28be7a13ecbb0ac1b7f96a31622c9c05 Mon Sep 17 00:00:00 2001 From: DSB Date: Sun, 4 Sep 2011 10:45:52 +0000 Subject: [PATCH] Config / E-Mail: - added delete message when deleting an e-mail recipient --- application/forms/Config/Email.php | 14 ++++++-------- .../views/scripts/sql/tables/show-tables.phtml | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/application/forms/Config/Email.php b/application/forms/Config/Email.php index 009b228..e2a89cc 100644 --- a/application/forms/Config/Email.php +++ b/application/forms/Config/Email.php @@ -49,7 +49,7 @@ class Application_Form_Config_Email extends Zend_Form_SubForm $this->_addSender(); $this->_addRecipient(); $this->_addButtonAddRecipientCc(); - + // add Recipients CC $ccElements = $this->_setRecipientCc( $this->_config->get('config.email.RecipientCc') @@ -57,7 +57,7 @@ class Application_Form_Config_Email extends Zend_Form_SubForm $this->_addAttachement(); $this->_addEmailProgram(); - + // create and add display group $elements = array( 'sendEmail', @@ -201,7 +201,7 @@ class Application_Form_Config_Email extends Zend_Form_SubForm */ private function _addRecipient() { - + //Recipient email $this->addElement( 'text', @@ -279,7 +279,6 @@ class Application_Form_Config_Email extends Zend_Form_SubForm } $elements = array(); - #$i = 0; foreach ($recipientsCc as $i => $recipient) { //Recipient CC email $this->addElement( @@ -333,8 +332,8 @@ class Application_Form_Config_Email extends Zend_Form_SubForm 'label' => '', 'class' => 'Formbutton emailToggle', 'onclick' => - 'if (!confirm(\'Ha\')) return false;' - .' deleteEmailRecipientCc(\'' . $i .'\');', + 'if (!confirm("' . $confirmDelete . '")) return false;' + .' deleteEmailRecipientCc(' . $i .');', ) ); @@ -346,7 +345,6 @@ class Application_Form_Config_Email extends Zend_Form_SubForm 'DeleteCc_'.$i, ) ); - $i++; } return $elements; } @@ -550,7 +548,7 @@ class Application_Form_Config_Email extends Zend_Form_SubForm } $values['RecipientCc'] = array_values($newArray); - + return $values; } diff --git a/application/views/scripts/sql/tables/show-tables.phtml b/application/views/scripts/sql/tables/show-tables.phtml index 0115367..b07b7cc 100644 --- a/application/views/scripts/sql/tables/show-tables.phtml +++ b/application/views/scripts/sql/tables/show-tables.phtml @@ -248,6 +248,7 @@ $this->jQuery()->onLoadCaptureStart(); $('.tableCheckbox').change(function() { checkButtonState(); }); +checkButtonState(); jQuery()->onLoadCaptureEnd(); ?> @@ -261,5 +262,4 @@ function checkButtonState() { objs_disable(objs); } } -checkButtonState();