SAAS-994: The Scheduled Play switch should not be able to be turned off without a warning message

Hid the element in the dashboard so it can never be turned off.
This commit is contained in:
drigato 2015-08-06 11:14:43 -04:00
parent 07d8a0de04
commit ea86675d07
2 changed files with 8 additions and 7 deletions

View File

@ -1096,6 +1096,13 @@ class Application_Model_Preference
public static function GetSourceSwitchStatus($sourcename)
{
// Scheduled play switch should always be "on".
// Even though we've hidden this element in the dashboard we should
// always make sure it's on or else a station's stream could go offline.
if ($sourcename == "scheduled_play") {
return "on";
}
$value = self::getValue($sourcename."_switch");
return ($value == null || $value == "off") ? 'off' : 'on';
}

View File

@ -22,7 +22,7 @@
</div>
<div class="source-info-block">
<h3><?php echo _("Source Streams") ?></h3>
<ul>
<ul style="padding-top: 10px;">
<li>
<div id="master_dj_div" class="source-label">
<a id="master_dj" class="source-kick-button" onclick="kickSource(this)"></a>
@ -41,12 +41,6 @@
<a href="#" id="live_dj" class="source-switch-button" onclick="setSwitchListener(this);"><span><?php echo $this->live_dj_switch?></span></a>
<div class="line-to-on-air"></div>
</li>
<li>
<div id="scheduled_play_div" class="source-label"><?php echo " "._("Scheduled Play") ?></div>
<div class="line-to-switch"></div>
<a href="#" id="scheduled_play" class="source-switch-button" onclick="setSwitchListener(this);"><span><?php echo $this->scheduled_play_switch?></span></a>
<div class="line-to-on-air"></div>
</li>
</ul>
</div>
<div class="on-air-block">