Skip to content

Commit

Permalink
[4.0] Language reinstall
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 #30808
  • Loading branch information
brianteeman committed Sep 30, 2020
1 parent 2f40e16 commit d154fd0
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 d154fd0

Please sign in to comment.