Skip to content

Commit

Permalink
fix checkbox state style
Browse files Browse the repository at this point in the history
  • Loading branch information
sualko committed May 11, 2018
1 parent fce1e8a commit 6f00325
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions css/settings.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
width: 100%;
}

#piwikSettings input {
#piwikSettings input, #piwikSettings label {
transition: background-color 0.5s;
}

#piwikSettings input.piwik-success {
#piwikSettings input.piwik-success, #piwikSettings label.piwik-success {
background-color: #4eb387;
}

#piwikSettings input.piwik-error {
#piwikSettings input.piwik-error, #piwikSettings label.piwik-error {
background-color: #f65c38;
}
4 changes: 4 additions & 0 deletions js/settings/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

$(function() {
function showRequestResult(element, result) {
if (element.attr('type') === 'checkbox') {
element = $('label[for="' + element.attr('id') + '"]');
}

element.removeClass('piwik-success piwik-error');
element.addClass('piwik-' + result);

Expand Down

0 comments on commit 6f00325

Please sign in to comment.