SAAS-939: Add option to preferences to display login button on radio page
This commit is contained in:
parent
9ec75f7179
commit
0601bd675e
|
@ -27,6 +27,8 @@ class IndexController extends Zend_Controller_Action
|
||||||
|
|
||||||
$this->view->stationUrl = Application_Common_HTTPHelper::getStationUrl();
|
$this->view->stationUrl = Application_Common_HTTPHelper::getStationUrl();
|
||||||
|
|
||||||
|
$this->view->displayLoginButton = Application_Model_Preference::getRadioPageDisplayLoginButton();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function mainAction()
|
public function mainAction()
|
||||||
|
|
|
@ -47,6 +47,7 @@ class PreferenceController extends Zend_Controller_Action
|
||||||
Application_Model_Preference::SetDefaultLocale($values["locale"]);
|
Application_Model_Preference::SetDefaultLocale($values["locale"]);
|
||||||
Application_Model_Preference::SetDefaultTimezone($values["timezone"]);
|
Application_Model_Preference::SetDefaultTimezone($values["timezone"]);
|
||||||
Application_Model_Preference::SetWeekStartDay($values["weekStartDay"]);
|
Application_Model_Preference::SetWeekStartDay($values["weekStartDay"]);
|
||||||
|
Application_Model_Preference::setRadioPageDisplayLoginButton($values["radioPageLoginButton"]);
|
||||||
|
|
||||||
$logoUploadElement = $form->getSubForm('preferences_general')->getElement('stationLogo');
|
$logoUploadElement = $form->getSubForm('preferences_general')->getElement('stationLogo');
|
||||||
$logoUploadElement->receive();
|
$logoUploadElement->receive();
|
||||||
|
|
|
@ -136,6 +136,17 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
||||||
$week_start_day->setMultiOptions($this->getWeekStartDays());
|
$week_start_day->setMultiOptions($this->getWeekStartDays());
|
||||||
$week_start_day->setValue(Application_Model_Preference::GetWeekStartDay());
|
$week_start_day->setValue(Application_Model_Preference::GetWeekStartDay());
|
||||||
$this->addElement($week_start_day);
|
$this->addElement($week_start_day);
|
||||||
|
|
||||||
|
$radioPageLoginButton = new Zend_Form_Element_Checkbox("radioPageLoginButton");
|
||||||
|
$radioPageLoginButton->setDecorators(array(
|
||||||
|
'ViewHelper',
|
||||||
|
'Errors',
|
||||||
|
'Label'
|
||||||
|
));
|
||||||
|
$radioPageLoginButton->addDecorator('Label', array("class" => "enable-tunein"));
|
||||||
|
$radioPageLoginButton->setLabel(_("Display login button on your Radio Page?"));
|
||||||
|
$radioPageLoginButton->setValue(Application_Model_Preference::getRadioPageDisplayLoginButton());
|
||||||
|
$this->addElement($radioPageLoginButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getWeekStartDays()
|
private function getWeekStartDays()
|
||||||
|
|
|
@ -1512,4 +1512,13 @@ class Application_Model_Preference
|
||||||
self::setValue("task_manager_lock", $value);
|
self::setValue("task_manager_lock", $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getRadioPageDisplayLoginButton()
|
||||||
|
{
|
||||||
|
return self::getValue("radio_page_display_login_button");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function setRadioPageDisplayLoginButton($value)
|
||||||
|
{
|
||||||
|
self::setValue("radio_page_display_login_button", $value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,5 +37,8 @@
|
||||||
|
|
||||||
<?php echo $this->element->getElement('thirdPartyApi')->render() ?>
|
<?php echo $this->element->getElement('thirdPartyApi')->render() ?>
|
||||||
|
|
||||||
|
<?php echo $this->element->getElement('radioPageLoginButton')->renderViewHelper() ?>
|
||||||
|
<?php echo $this->element->getElement('radioPageLoginButton')->renderLabel() ?>
|
||||||
|
|
||||||
</dl>
|
</dl>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
|
@ -24,12 +24,14 @@ document.getElementById(id).width= (newwidth) + "px";
|
||||||
echo "<a href='#' class='logo'><img src='data:image/png;base64," . $this->stationLogo . "'></a>";
|
echo "<a href='#' class='logo'><img src='data:image/png;base64," . $this->stationLogo . "'></a>";
|
||||||
} ?>
|
} ?>
|
||||||
|
|
||||||
<div class="login-btn">
|
<?php if ($this->displayLoginButton) {
|
||||||
<a href="/login" target="_parent">
|
echo "<div class='login-btn'>
|
||||||
|
<a href='/login' target='_parent'>
|
||||||
<span>Login</span>
|
<span>Login</span>
|
||||||
<span class="login-img"></span>
|
<span class='login-img'></span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>";
|
||||||
|
}?>
|
||||||
|
|
||||||
<div id="tab-1" class="schedule tab_content current">
|
<div id="tab-1" class="schedule tab_content current">
|
||||||
<iframe onLoad="autoResize('schedule_iframe');" id="schedule_iframe" height="300px" scrolling="yes" frameborder="0" src=<?php echo $this->stationUrl."embed/weekly-program?style=premium"?>></iframe>
|
<iframe onLoad="autoResize('schedule_iframe');" id="schedule_iframe" height="300px" scrolling="yes" frameborder="0" src=<?php echo $this->stationUrl."embed/weekly-program?style=premium"?>></iframe>
|
||||||
|
|
Loading…
Reference in New Issue