Skip to content

Commit

Permalink
[4.0] Language reinstall (joomla#30810)
Browse files Browse the repository at this point in the history
Adds a visual indicator to the button for reinstalling a language by changing the button color

PR for joomla#30808
  • Loading branch information
brianteeman authored and sakiss committed Oct 16, 2020
1 parent b6f31ef commit bf7f8d7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@
<tr class="row<?php echo $i % 2; ?>">
<td>
<?php $buttonText = (isset($this->installedLang[0][$language->code]) || isset($this->installedLang[1][$language->code])) ? 'REINSTALL' : 'INSTALL'; ?>
<?php $buttonClass = (isset($this->installedLang[0][$language->code]) || isset($this->installedLang[1][$language->code])) ? 'btn btn-success btn-sm' : 'btn btn-primary btn-sm'; ?>
<?php $onclick = 'document.getElementById(\'install_url\').value = \'' . $language->detailsurl . '\'; Joomla.submitbutton(\'install.install\');'; ?>
<input type="button" class="btn btn-primary btn-sm" value="<?php echo Text::_('COM_INSTALLER_' . $buttonText . '_BUTTON'); ?>" onclick="<?php echo $onclick; ?>">
<input type="button" class="<?php echo $buttonClass; ?>" value="<?php echo Text::_('COM_INSTALLER_' . $buttonText . '_BUTTON'); ?>" onclick="<?php echo $onclick; ?>">
</td>
<th scope="row">
<?php echo $language->name; ?>
Expand Down

0 comments on commit bf7f8d7

Please sign in to comment.