Skip to content

Commit 884519c

Browse files
committed
fix(style): disabled classes applied incorrectly
1 parent f790c28 commit 884519c

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

src/public/js/angularjs/controllers/settings.js

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -371,13 +371,13 @@ define([
371371
}
372372

373373
$scope.$watch('mailerEnabled', function(newVal) {
374-
$('input#mailerHost').attr('disabled', !newVal);
375-
$('input#mailerSSL').attr('disabled', !newVal);
376-
$('input#mailerPort').attr('disabled', !newVal);
377-
$('input#mailerUsername').attr('disabled', !newVal);
378-
$('input#mailerPassword').attr('disabled', !newVal);
379-
$('input#mailerFrom').attr('disabled', !newVal);
380-
$('button#mailerSubmit').attr('disabled', !newVal);
374+
$('input#mailerHost').attr('disabled', !newVal).parent().toggleClass('md-input-wrapper-disabled', !newVal);
375+
$('input#mailerSSL').attr('disabled', !newVal).parent().toggleClass('md-input-wrapper-disabled', !newVal);
376+
$('input#mailerPort').attr('disabled', !newVal).parent().toggleClass('md-input-wrapper-disabled', !newVal);
377+
$('input#mailerUsername').attr('disabled', !newVal).parent().toggleClass('md-input-wrapper-disabled', !newVal);
378+
$('input#mailerPassword').attr('disabled', !newVal).parent().toggleClass('md-input-wrapper-disabled', !newVal);
379+
$('input#mailerFrom').attr('disabled', !newVal).parent().toggleClass('md-input-wrapper-disabled', !newVal);
380+
$('button#mailerSubmit').attr('disabled', !newVal).parent().toggleClass('md-input-wrapper-disabled', !newVal);
381381
});
382382

383383
$scope.defaultTicketTypeChanged = function() {
@@ -641,11 +641,12 @@ define([
641641
$scope.$watch('mailerCheckEnabled', function(newVal) {
642642
var $mailerCheckTicketTypeSelectize = $('select#mailerCheckTicketType').selectize()[0];
643643
var $mailerCheckTicketPrioritySelectize = $('select#mailerCheckTicketPriority').selectize()[0];
644-
$('input#mailerCheckHost').attr('disabled', !newVal);
645-
$('input#mailerCheckPort').attr('disabled', !newVal);
646-
$('input#mailerCheckUsername').attr('disabled', !newVal);
647-
$('input#mailerCheckPassword').attr('disabled', !newVal);
648-
$('button#mailerCheckSubmit').attr('disabled', !newVal);
644+
645+
$('input#mailerCheckHost').attr('disabled', !newVal).parent().toggleClass('md-input-wrapper-disabled', !newVal);
646+
$('input#mailerCheckPort').attr('disabled', !newVal).parent().toggleClass('md-input-wrapper-disabled', !newVal);
647+
$('input#mailerCheckUsername').attr('disabled', !newVal).parent().toggleClass('md-input-wrapper-disabled', !newVal);
648+
$('input#mailerCheckPassword').attr('disabled', !newVal).parent().toggleClass('md-input-wrapper-disabled', !newVal);
649+
$('button#mailerCheckSubmit').attr('disabled', !newVal).parent().toggleClass('md-input-wrapper-disabled', !newVal);
649650
if (!_.isUndefined($mailerCheckTicketTypeSelectize)) {
650651
if (!newVal)
651652
$mailerCheckTicketTypeSelectize.selectize.disable();
@@ -1616,6 +1617,7 @@ define([
16161617
}
16171618
}).then(function successCallback() {
16181619
helpers.UI.showSnackbar('Color Scheme Saved. Reloading...', false);
1620+
// Call rebuild of app.min.css
16191621
$timeout(function() { $window.location.reload(); }, 1000);
16201622
}, function errorCallback(err) {
16211623
helpers.UI.showSnackbar(err, true);

0 commit comments

Comments
 (0)