function showStatus($type) { static $status; if (!isset($status)) { $status = SEFTools::getSEOStatus(); } $html = '<div id="sef_status_' . $type . '">'; $html .= '<div id="sef_status_' . $type . '_1"' . ($status[$type] ? '' : ' style="display: none"') . '>'; $html .= '<span style="font-weight: bold; color: green;">' . JText::_('COM_SEF_ENABLED') . '</span>'; $html .= ' <input type="button" class="btn btn-danger btn-small" onclick="JoomSEF.ajaxItemTask(\'status\', \'' . $type . '\', \'disableStatus\');" value="' . JText::_('COM_SEF_DISABLE') . '" />'; $html .= '</div>'; $html .= '<div id="sef_status_' . $type . '_0"' . (!$status[$type] ? '' : ' style="display: none"') . '>'; $html .= '<span style="font-weight: bold; color: red;">' . JText::_('COM_SEF_DISABLED') . '</span>'; $html .= ' <input type="button" class="btn btn-success btn-small" onclick="JoomSEF.ajaxItemTask(\'status\', \'' . $type . '\', \'enableStatus\');" value="' . JText::_('COM_SEF_ENABLE') . '" />'; $html .= '</div>'; $html .= $this->getAjaxWorking('status_' . $type); $html .= '</div>'; echo $html; }
function showStatus($type) { static $status; if (!isset($status)) { $status = SEFTools::getSEOStatus(); } if (isset($status[$type])) { if ($status[$type]) { echo '<span style="font-weight: bold; color: green;">' . JText::_('Enabled') . '</span>'; echo ' <input type="button" onclick="disableStatus(\'' . $type . '\');" value="' . JText::_('Disable') . '" />'; } else { echo '<span style="font-weight: bold; color: red;">' . JText::_('Disabled') . '</span>'; echo ' <input type="button" onclick="enableStatus(\'' . $type . '\');" value="' . JText::_('Enable') . '" />'; } } }