Merge branch 'devel' into 2.3.x-saas
Conflicts: airtime_mvc/application/controllers/PreferenceController.php airtime_mvc/application/forms/AddShowWhen.php airtime_mvc/application/forms/GeneralPreferences.php airtime_mvc/application/forms/LiveStreamingPreferences.php airtime_mvc/application/forms/SoundcloudPreferences.php airtime_mvc/application/forms/SupportSettings.php airtime_mvc/application/views/scripts/form/preferences.phtml airtime_mvc/application/views/scripts/form/preferences_email_server.phtml airtime_mvc/application/views/scripts/form/preferences_general.phtml airtime_mvc/application/views/scripts/form/preferences_livestream.phtml airtime_mvc/application/views/scripts/form/support-setting.phtml airtime_mvc/application/views/scripts/schedule/add- show-form.phtml airtime_mvc/public/js/airtime/preferences/preferences.js python_apps/api_clients/api_client.py python_apps/pypo/listenerstat.py
This commit is contained in:
commit
8cd6bd9aa4
346 changed files with 48955 additions and 11856 deletions
|
@ -5,6 +5,7 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
|
||||
public function init()
|
||||
{
|
||||
$notEmptyValidator = Application_Form_Helper_ValidationTypes::overrideNotEmptyValidator();
|
||||
$this->setDecorators(array(
|
||||
array('ViewScript', array('viewScript' => 'form/preferences_general.phtml'))
|
||||
));
|
||||
|
@ -17,7 +18,7 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
//Station name
|
||||
$this->addElement('text', 'stationName', array(
|
||||
'class' => 'input_text',
|
||||
'label' => 'Station Name',
|
||||
'label' => _('Station Name'),
|
||||
'required' => false,
|
||||
'filters' => array('StringTrim'),
|
||||
'value' => Application_Model_Preference::GetStationName(),
|
||||
|
@ -29,12 +30,12 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
//Default station fade
|
||||
$this->addElement('text', 'stationDefaultFade', array(
|
||||
'class' => 'input_text',
|
||||
'label' => 'Default Fade (s):',
|
||||
'required' => false,
|
||||
'label' => _('Default Fade (s):'),
|
||||
'required' => true,
|
||||
'filters' => array('StringTrim'),
|
||||
'validators' => array(array('regex', false,
|
||||
'validators' => array(array($notEmptyValidator, 'regex', false,
|
||||
array('/^[0-9]{1,2}(\.\d{1})?$/',
|
||||
'messages' => 'enter a time in seconds 0{.0}'))),
|
||||
'messages' => _('enter a time in seconds 0{.0}')))),
|
||||
'value' => $defaultFade,
|
||||
'decorators' => array(
|
||||
'ViewHelper'
|
||||
|
@ -42,9 +43,10 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
));
|
||||
|
||||
$third_party_api = new Zend_Form_Element_Radio('thirdPartyApi');
|
||||
$third_party_api->setLabel('Website Widgets:');
|
||||
$third_party_api->setMultiOptions(array("Disabled",
|
||||
"Enabled"));
|
||||
$third_party_api->setLabel(
|
||||
sprintf(_('Allow Remote Websites To Access "Schedule" Info?%s (Enable this to make front-end widgets work.)'), '<br>'));
|
||||
$third_party_api->setMultiOptions(array(_("Disabled"),
|
||||
_("Enabled")));
|
||||
$third_party_api->setValue(Application_Model_Preference::GetAllow3rdPartyApi());
|
||||
$third_party_api->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($third_party_api);
|
||||
|
@ -63,50 +65,30 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
)
|
||||
));
|
||||
|
||||
$locale = new Zend_Form_Element_Select("locale");
|
||||
$locale->setLabel(_("Default Interface Language"));
|
||||
$locale->setMultiOptions(Application_Model_Locale::getLocales());
|
||||
$locale->setValue(Application_Model_Preference::GetDefaultLocale());
|
||||
$locale->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($locale);
|
||||
|
||||
/* Form Element for setting the Timezone */
|
||||
$timezone = new Zend_Form_Element_Select("timezone");
|
||||
$timezone->setLabel("Timezone");
|
||||
$timezone->setMultiOptions($this->getTimezones());
|
||||
$timezone->setValue(Application_Model_Preference::GetTimezone());
|
||||
$timezone->setLabel(_("Default Interface Timezone"));
|
||||
$timezone->setMultiOptions(Application_Common_Timezone::getTimezones());
|
||||
$timezone->setValue(Application_Model_Preference::GetDefaultTimezone());
|
||||
$timezone->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($timezone);
|
||||
|
||||
/* Form Element for setting which day is the start of the week */
|
||||
$week_start_day = new Zend_Form_Element_Select("weekStartDay");
|
||||
$week_start_day->setLabel("Week Starts On");
|
||||
$week_start_day->setLabel(_("Week Starts On"));
|
||||
$week_start_day->setMultiOptions($this->getWeekStartDays());
|
||||
$week_start_day->setValue(Application_Model_Preference::GetWeekStartDay());
|
||||
$week_start_day->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($week_start_day);
|
||||
}
|
||||
|
||||
private function getTimezones()
|
||||
{
|
||||
$regions = array(
|
||||
'Africa' => DateTimeZone::AFRICA,
|
||||
'America' => DateTimeZone::AMERICA,
|
||||
'Antarctica' => DateTimeZone::ANTARCTICA,
|
||||
'Arctic' => DateTimeZone::ARCTIC,
|
||||
'Asia' => DateTimeZone::ASIA,
|
||||
'Atlantic' => DateTimeZone::ATLANTIC,
|
||||
'Australia' => DateTimeZone::AUSTRALIA,
|
||||
'Europe' => DateTimeZone::EUROPE,
|
||||
'Indian' => DateTimeZone::INDIAN,
|
||||
'Pacific' => DateTimeZone::PACIFIC
|
||||
);
|
||||
|
||||
$tzlist = array();
|
||||
|
||||
foreach ($regions as $name => $mask) {
|
||||
$ids = DateTimeZone::listIdentifiers($mask);
|
||||
foreach ($ids as $id) {
|
||||
$tzlist[$id] = str_replace("_", " ", $id);
|
||||
}
|
||||
}
|
||||
|
||||
return $tzlist;
|
||||
}
|
||||
|
||||
private static function getWidgetCode() {
|
||||
|
||||
$host = $_SERVER['SERVER_NAME'];
|
||||
|
@ -146,13 +128,13 @@ CODE;
|
|||
private function getWeekStartDays()
|
||||
{
|
||||
$days = array(
|
||||
'Sunday',
|
||||
'Monday',
|
||||
'Tuesday',
|
||||
'Wednesday',
|
||||
'Thursday',
|
||||
'Friday',
|
||||
'Saturday'
|
||||
_('Sunday'),
|
||||
_('Monday'),
|
||||
_('Tuesday'),
|
||||
_('Wednesday'),
|
||||
_('Thursday'),
|
||||
_('Friday'),
|
||||
_('Saturday')
|
||||
);
|
||||
|
||||
return $days;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue