/** * Return footer html for fieldset * Add extra tooltip comments to elements * * @param Varien_Data_Form_Element_Abstract $element * * @return string */ protected function _getFooterHtml($element) { $cronPath = Mage::getBaseDir() . '/shell/bronto/cron.php'; $phpPath = exec('which php'); $html = "<tr><td> </td>\n <td id=\"bronto-magecron-example\" colspan=\"3\">\n <em style=\"margin:5px;\">* Note: You will need to change the \$CRON_USER to match the cron user in your environment.</em>\n <br/>\n <strong style=\"margin:5px;\">To setup the cron script, you will need to add a command to your crontab file. Here are some examples:</strong>\n <div style=\"border:1px solid #ccc; padding:5px; margin:5px;\">\n<strong>To run the API Send Cron every minute:</strong>\n<pre>* * * * * \$CRON_USER {$phpPath} {$cronPath} -a run -t send</pre>\n<strong>To run the API Retry Cron every 2 minutes:</strong>\n<pre>*/2 * * * * \$CRON_USER {$phpPath} {$cronPath} -a run -t api</pre>\n<strong>To run the Reminder Cron every 15 minutes:</strong>\n<pre>*/15 * * * * \$CRON_USER {$phpPath} {$cronPath} -a run -t reminder</pre>\n<strong>To run the Order Import Cron once Daily at Midnight:</strong>\n<pre>0 0 * * * \$CRON_USER {$phpPath} {$cronPath} -a run -t order</pre>\n<strong>To run the Product Recommendation Cron once Daily at Midnight:</strong>\n<pre>0 0 * * * \$CRON_USER {$phpPath} {$cronPath} -a run -t product</pre>\n<strong>To run the Customer Import Cron twice Daily:</strong>\n<pre>0 */2 * * * \$CRON_USER {$phpPath} {$cronPath} -a run -t customer</pre>\n<strong>To run the Newsletter Opt-In Cron every 30 minutes:</strong>\n<pre>*/30 * * * * \$CRON_USER {$phpPath} {$cronPath} -a run -t newsletter</pre>\n<strong>To run all Module Crons once Daily:</strong>\n<pre>0 0 * * * \$CRON_USER {$phpPath} {$cronPath} -a run</pre>\n</div>\n</td></tr>"; return $html . parent::_getFooterHtml($element); }
protected function _getFooterHtml($element) { $ajaxUrl = $this->getUrl('support/adminhtml_support/sendmail'); $html = parent::_getFooterHtml($element); $html = '<h4>' . $this->__('Visit ') . '<span style="color: #ea7601; font-weight: normal; text-decoration: underline;">https://www.milople.com/magento-extensions/</span></h4>' . $html; $html .= Mage::helper('adminhtml/js')->getScript(" \n supportForm = new varienForm(\$('{$element->getHtmlId()}'));\n indiesSupport = function(){\n\t\t\t\tif (supportForm.validator.validate()){\n\t\t\t\t\tvar request = new Ajax.Request(\n '{$ajaxUrl}',\n {\n method:'post',\t\t\t\t\t\t\t\n onSuccess: function () {\n \t\t\t\t\t\t\t\talert('Mail has been sent successfully. We will be in touch with you within a short time.');\n\t\t\t\t\t\t\t\t\t\tdocument.getElementById('name').value = '';\n\t\t\t\t\t\t\t\t\t\tdocument.getElementById('email').value = '';\n\t\t\t\t\t\t\t\t\t\tdocument.getElementById('license').value = '';\n\t\t\t\t\t\t\t\t\t\tdocument.getElementById('subject').value = '';\n\t\t\t\t\t\t\t\t\t\tdocument.getElementById('reason').value = '';\n\t\t\t\t\t\t\t\t\t\tdocument.getElementById('message').value = '';\n \t\t\t\t\t\t\t\t\t},\t\t\t\t\t\t\t\n parameters: Form.serialize(\$('{$element->getHtmlId()}'))\n }\n );\n }\n }\n successResponse = function(transport){\n if (transport && transport.responseText){\n try{\n response = eval('(' + transport.responseText + ')');\t\t\t\t\t\t\n }\n catch (e) {\n response = {};\n }\n }\n if ((typeof response.message) == 'string') {\n \$('ajax-response').update(response.message);\n } else {\n \$('ajax-response').update(response.message.join(\"\\n\"));\n }\n\t\t\t\talert('test1');\n new PeriodicalExecuter(function(pe){ \$('ajax-response').update(''); pe.stop(); }, 5);\n }\n "); return $html; }
/** * Return footer html for fieldset * Add extra tooltip comments to elements * * @param Varien_Data_Form_Element_Abstract $element * * @return string */ protected function _getFooterHtml($element) { $owner = Mage::getStoreConfig('bronto_verify/permissionchecker/owner'); $group = Mage::getStoreConfig('bronto_verify/permissionchecker/group'); $dir = Mage::getStoreConfig('bronto_verify/permissionchecker/directories'); $file = Mage::getStoreConfig('bronto_verify/permissionchecker/files'); if ('' != $owner || '' != $group) { $chown = 'sudo chown -R ' . ('' != $owner ? $owner : '') . ('' != $group ? ':' . $group : '') . ' ./*'; } else { $chown = ''; } $vMage = 'mage'; if (Mage::helper('bronto_common')->isVersionMatch(Mage::getVersionInfo(), 1, array(array('<', 5)))) { $vMage = 'pear'; } $dPerm = '' == $dir ? '755' : $dir; $fPerm = '' == $file ? '644' : $file; $html = "<tr><td> </td>\n <td colspan=\"3\"><strong style=\"margin:5px;\">To apply permissions, Run These Commands in the shell at the root of your site:</strong>\n <div style=\"border:1px solid #ccc; padding:5px; margin:5px;\">\n<pre>{$chown}\nsudo find . -type d -exec chmod {$dPerm} {} \\;\nsudo find . -type f -exec chmod {$fPerm} {} \\;\nsudo chmod -R 777 media\nsudo chmod -R 777 var\nsudo chmod 550 {$vMage}\nsudo chmod o+w var/.htaccess app/etc</pre>\n</div></td></tr>"; return $html . parent::_getFooterHtml($element); }
protected function _getFooterHtml($element) { $html = parent::_getFooterHtml($element); $html .= Mage::helper('adminhtml/js')->getScript("\n \$\$('td.form-buttons')[0].update('');\n \$('{$element->getHtmlId()}' + '-head').setStyle('background: none;');\n \$('{$element->getHtmlId()}' + '-head').writeAttribute('onclick', 'return false;');\n \$('{$element->getHtmlId()}').show();\n "); return $html; }
protected function _getFooterHtml($element) { $html = parent::_getFooterHtml($element); //$html = '<h4>' . $this->__('Installed Indies Extensions') . '</h4>' . $html; return $html; }
/** * Get Footer HTML * * @see parent * * @param Varien_Data_Form_Element_Abstract $element * * @return string */ protected function _getFooterHtml($element) { $html = parent::_getFooterHtml($element); $fieldsetIndex = strpos($html, '</fieldset'); return substr($html, $fieldsetIndex); }
/** * Show version info * @param Varien_Data_Form_Element_Abstract $element * @return string */ protected function _getFooterHtml($element) { /** @var JeroenVermeulen_Solarium_Helper_Data $helper */ $helper = Mage::helper('jeroenvermeulen_solarium'); ob_start(); ?> <table class="form-list"> <tbody> <tr> <td class="label"> </td> <td> <button type="button" onclick="solariumTestConnection();"> <?php echo htmlspecialchars($helper->__('Test Connection')); ?> </button> <button type="button" onclick="solariumSelfTest();"> <?php echo htmlspecialchars($helper->__('Self Test')); ?> </button> </td> </tr> </tbody> </table> <table class="form-list"> <tbody id="solarium_test_connection_result" style="display: none;"> <tr> <td class="label"> </td> <td> </td> </tr> </tbody> </table> <script type="text/javascript"> function solariumTestMessage(action, message, setClass) { if (!setClass) { setClass = ''; } var resultRow = ''; resultRow += '<tr>'; resultRow += '<td class="label">' + action + '</td>'; resultRow += '<td class="value ' + setClass + '">' + message + '</td>'; resultRow += '</tr>'; $('solarium_test_connection_result').update(resultRow).show(); } function solariumGetParams() { return { host: $('jeroenvermeulen_solarium_server_host').value, port: $('jeroenvermeulen_solarium_server_port').value, path: $('jeroenvermeulen_solarium_server_path').value, core: $('jeroenvermeulen_solarium_server_core').value, auth: $('jeroenvermeulen_solarium_server_requires_authentication').value, username: $('jeroenvermeulen_solarium_server_username').value, password: $('jeroenvermeulen_solarium_server_password').value, timeout: $('jeroenvermeulen_solarium_server_search_timeout').value }; } function solariumTestConnection() { var action = '' + <?php echo json_encode($helper->__('Connection Test')); ?> ; solariumTestMessage(action, <?php echo json_encode($helper->__('Connecting...')); ?> ); new Ajax.Request(<?php echo json_encode(Mage::helper("adminhtml")->getUrl("adminhtml/solarium/testConnection")); ?> , { 'parameters': solariumGetParams(), 'onComplete': function ($response) { $('solarium_test_connection_result').update($response.responseText).show(); }, 'onFailure': function ($response) { solariumTestMessage(action, <?php echo json_encode($helper->__('ERROR')); ?> +' ' + response.status + ': ' + $response.responseText, 'not-available'); } }); } function solariumSelfTest() { var action = '' + <?php echo json_encode($helper->__('Self Test')); ?> ; solariumTestMessage(action, <?php echo json_encode($helper->__('Testing...')); ?> ); new Ajax.Request(<?php echo json_encode(Mage::helper("adminhtml")->getUrl("adminhtml/solarium/selfTest")); ?> , { 'parameters': solariumGetParams(), 'onComplete': function ($response) { $('solarium_test_connection_result').update($response.responseText).show(); }, 'onFailure': function ($response) { solariumTestMessage(<?php echo json_encode($helper->__('ERROR')); ?> +' ' + response.status + ': ' + $response.responseText, 'not-available'); } }); } </script> <?php return ob_get_clean() . parent::_getFooterHtml($element); }
/** * Return footer html for fieldset * Add extra tooltip comments to elements * * @param Varien_Data_Form_Element_Abstract $element * * @return string */ protected function _getFooterHtml($element) { $html = "<tr><td> </td>\r\n <td id=\"bronto-magecron-example\" colspan=\"3\"><strong style=\"margin:5px;\">To setup the cron script, you will need to add a command to your crontab file. Here are some examples:</strong>\r\n <div style=\"border:1px solid #ccc; padding:5px; margin:5px;\">\r\n<strong>To run the API Retry Cron every 2 minutes:</strong>\r\n<pre>*/2 * * * * rot /usr/bin/php /var/www/magento/shell/bronto/cron.php -a run -t api</pre>\r\n<strong>To run the Reminder Cron every 15 minutes:</strong>\r\n<pre>*/15 * * * * root /usr/bin/php /var/www/magento/shell/bronto/cron.php -a run -t reminder</pre>\r\n<strong>To run the Order Import Cron once Daily at Midnight:</strong>\r\n<pre>0 0 * * * root /usr/bin/php /var/www/magento/shell/bronto/cron.php -a run -t order</pre>\r\n<strong>To run the Customer Import Cron twice Daily:</strong>\r\n<pre>0 */2 * * * root /usr/bin/php /var/www/magento/shell/bronto/cron.php -a run -t customer</pre>\r\n<strong>To run the Newsletter Opt-In Cron every 30 minutes:</strong>\r\n<pre>*/30 * * * * root /usr/bin/php /var/www/magento/shell/bronto/cron.php -a run -t newsletter</pre>\r\n<strong>To run all Module Crons once Daily:</strong>\r\n<pre>0 0 * * * root /usr/bin/php /var/www/magento/shell/bronto/cron.php -a run</pre>\r\n</div>\r\n<em style=\"margin:5px;\">* Note: You will need to change the owner, php path, and path to magento to match your environment.</em>\r\n</td></tr>"; return $html . parent::_getFooterHtml($element); }