diff --git a/module/custom/control.php b/module/custom/control.php index 259cbf1873..d0b81f7f15 100644 --- a/module/custom/control.php +++ b/module/custom/control.php @@ -650,7 +650,7 @@ class custom extends control $this->view->position[] = $this->lang->custom->common; $this->view->position[] = $this->view->title; $this->view->mode = $mode; - $this->view->program = $this->loadModel('program')->getTopPairs('', 'noclosed', true); + $this->view->programs = $this->loadModel('program')->getTopPairs('', 'noclosed', true); $this->view->programID = isset($this->config->global->defaultProgram) ? $this->config->global->defaultProgram : 0; $this->display(); diff --git a/module/custom/js/mode.js b/module/custom/js/mode.js index e27ffe602c..d62ef0bf1b 100644 --- a/module/custom/js/mode.js +++ b/module/custom/js/mode.js @@ -14,7 +14,7 @@ $(function() var selectedMode = $('[name=mode]:checked').val(); if(mode == selectedMode) return false; - if(selectedMode == 'light') + if(selectedMode == 'light' && hasProgram) { $('#selectProgramModal').modal('show'); } diff --git a/module/custom/view/mode.html.php b/module/custom/view/mode.html.php index 51abcf7274..53737573a6 100644 --- a/module/custom/view/mode.html.php +++ b/module/custom/view/mode.html.php @@ -13,6 +13,7 @@ custom->changeModeTips, $lang->custom->modeList[$mode == 'light' ? 'ALM' : 'light']));?> +