Added some basic javascript based checking to require album override to be enabled for auto smartblock to be enabled

This commit is contained in:
Robb Ebright 2017-08-23 12:43:48 -04:00
parent 3515a898a7
commit 9dae48702f
1 changed files with 14 additions and 0 deletions

View File

@ -29,6 +29,19 @@ function setEnableSystemEmailsListener() {
});
}
function setPodcastAutoSmartblockReadonly() {
var disablePodcastAutomSmartblock = $("#podcastAutoSmartblock-0");
var enablePodcastAutomSmartblock = $("#podcastAutoSmartblock-1");
var podcastOverride = $("#podcastAlbumOverride-1");
if ($(podcastOverride).is(':checked')) {
enablePodcastAutomSmartblock.removeAttr("readonly");
} else {
disablePodcastAutomSmartblock.prop("checked", true);
disablePodcastAutomSmartblock.attr("readonly","readonly");
enablePodcastAutomSmartblock.attr("readonly","readonly");
}
}
function setSystemFromEmailReadonly() {
var enableSystemEmails = $("#enableSystemEmail");
var systemFromEmail = $("#systemEmail");
@ -189,6 +202,7 @@ $(document).ready(function() {
showErrorSections();
setMailServerInputReadonly();
setPodcastAutoSmartblockReadonly();
setSystemFromEmailReadonly();
setConfigureMailServerListener();
setEnableSystemEmailsListener();