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
|
@ -7,6 +7,7 @@ class Application_Form_SupportSettings extends Zend_Form
|
|||
public function init()
|
||||
{
|
||||
$country_list = Application_Model_Preference::GetCountryList();
|
||||
$notEmptyValidator = Application_Form_Helper_ValidationTypes::overrideNotEmptyValidator();
|
||||
|
||||
$this->setDecorators(array(
|
||||
array('ViewScript', array('viewScript' => 'form/support-setting.phtml')),
|
||||
|
@ -16,10 +17,10 @@ class Application_Form_SupportSettings extends Zend_Form
|
|||
//Station name
|
||||
$this->addElement('text', 'stationName', array(
|
||||
'class' => 'input_text',
|
||||
'label' => 'Station Name',
|
||||
'label' => _('Station Name'),
|
||||
'required' => true,
|
||||
'filters' => array('StringTrim'),
|
||||
'validator' => array('NotEmpty'),
|
||||
'validators' => array($notEmptyValidator),
|
||||
'value' => Application_Model_Preference::GetStationName(),
|
||||
'decorators' => array(
|
||||
'ViewHelper'
|
||||
|
@ -29,7 +30,7 @@ class Application_Form_SupportSettings extends Zend_Form
|
|||
// Phone number
|
||||
$this->addElement('text', 'Phone', array(
|
||||
'class' => 'input_text',
|
||||
'label' => 'Phone:',
|
||||
'label' => _('Phone:'),
|
||||
'required' => false,
|
||||
'filters' => array('StringTrim'),
|
||||
'value' => Application_Model_Preference::GetPhone(),
|
||||
|
@ -41,7 +42,7 @@ class Application_Form_SupportSettings extends Zend_Form
|
|||
//Email
|
||||
$this->addElement('text', 'Email', array(
|
||||
'class' => 'input_text',
|
||||
'label' => 'Email:',
|
||||
'label' => _('Email:'),
|
||||
'required' => false,
|
||||
'filters' => array('StringTrim'),
|
||||
'value' => Application_Model_Preference::GetEmail(),
|
||||
|
@ -52,7 +53,7 @@ class Application_Form_SupportSettings extends Zend_Form
|
|||
|
||||
// Station Web Site
|
||||
$this->addElement('text', 'StationWebSite', array(
|
||||
'label' => 'Station Web Site:',
|
||||
'label' => _('Station Web Site:'),
|
||||
'required' => false,
|
||||
'class' => 'input_text',
|
||||
'value' => Application_Model_Preference::GetStationWebSite(),
|
||||
|
@ -63,7 +64,7 @@ class Application_Form_SupportSettings extends Zend_Form
|
|||
|
||||
// county list dropdown
|
||||
$this->addElement('select', 'Country', array(
|
||||
'label' => 'Country:',
|
||||
'label' => _('Country:'),
|
||||
'required' => false,
|
||||
'value' => Application_Model_Preference::GetStationCountry(),
|
||||
'multiOptions' => $country_list,
|
||||
|
@ -74,7 +75,7 @@ class Application_Form_SupportSettings extends Zend_Form
|
|||
|
||||
// Station city
|
||||
$this->addElement('text', 'City', array(
|
||||
'label' => 'City:',
|
||||
'label' => _('City:'),
|
||||
'required' => false,
|
||||
'class' => 'input_text',
|
||||
'value' => Application_Model_Preference::GetStationCity(),
|
||||
|
@ -86,7 +87,7 @@ class Application_Form_SupportSettings extends Zend_Form
|
|||
// Station Description
|
||||
$description = new Zend_Form_Element_Textarea('Description');
|
||||
$description->class = 'input_text_area';
|
||||
$description->setLabel('Station Description:')
|
||||
$description->setLabel(_('Station Description:'))
|
||||
->setRequired(false)
|
||||
->setValue(Application_Model_Preference::GetStationDescription())
|
||||
->setDecorators(array('ViewHelper'))
|
||||
|
@ -96,7 +97,7 @@ class Application_Form_SupportSettings extends Zend_Form
|
|||
|
||||
// Station Logo
|
||||
$upload = new Zend_Form_Element_File('Logo');
|
||||
$upload->setLabel('Station Logo:')
|
||||
$upload->setLabel(_('Station Logo:'))
|
||||
->setRequired(false)
|
||||
->setDecorators(array('File'))
|
||||
->addValidator('Count', false, 1)
|
||||
|
@ -107,7 +108,7 @@ class Application_Form_SupportSettings extends Zend_Form
|
|||
|
||||
//enable support feedback
|
||||
$this->addElement('checkbox', 'SupportFeedback', array(
|
||||
'label' => 'Send support feedback',
|
||||
'label' => _('Send support feedback'),
|
||||
'required' => false,
|
||||
'value' => Application_Model_Preference::GetSupportFeedback(),
|
||||
'decorators' => array(
|
||||
|
@ -117,7 +118,7 @@ class Application_Form_SupportSettings extends Zend_Form
|
|||
|
||||
// checkbox for publicise
|
||||
$checkboxPublicise = new Zend_Form_Element_Checkbox("Publicise");
|
||||
$checkboxPublicise->setLabel('Promote my station on Sourcefabric.org')
|
||||
$checkboxPublicise->setLabel(_('Promote my station on Sourcefabric.org'))
|
||||
->setRequired(false)
|
||||
->setDecorators(array('ViewHelper'))
|
||||
->setValue(Application_Model_Preference::GetPublicise());
|
||||
|
@ -128,15 +129,18 @@ class Application_Form_SupportSettings extends Zend_Form
|
|||
|
||||
// checkbox for privacy policy
|
||||
$checkboxPrivacy = new Zend_Form_Element_Checkbox("Privacy");
|
||||
$checkboxPrivacy->setLabel("By checking this box, I agree to Sourcefabric's <a id=\"link_to_privacy\" href=\"http://www.sourcefabric.org/en/about/policy/\" onclick=\"window.open(this.href); return false;\">privacy policy</a>.")
|
||||
$checkboxPrivacy->setLabel(
|
||||
sprintf(_("By checking this box, I agree to Sourcefabric's %sprivacy policy%s."),
|
||||
"<a id='link_to_privacy' href='http://www.sourcefabric.org/en/about/policy/' onclick='window.open(this.href); return false;'>",
|
||||
"</a>"))
|
||||
->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($checkboxPrivacy);
|
||||
|
||||
// submit button
|
||||
$submit = new Zend_Form_Element_Submit("submit");
|
||||
$submit->class = 'ui-button ui-state-default right-floated';
|
||||
$submit->class = 'btn right-floated';
|
||||
$submit->setIgnore(true)
|
||||
->setLabel("Save")
|
||||
->setLabel(_("Save"))
|
||||
->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($submit);
|
||||
}
|
||||
|
@ -145,13 +149,13 @@ class Application_Form_SupportSettings extends Zend_Form
|
|||
public function isValid ($data)
|
||||
{
|
||||
$isValid = parent::isValid($data);
|
||||
if (isset($data["Privacy"])) {
|
||||
$checkPrivacy = $this->getElement('Privacy');
|
||||
if ($data["SupportFeedback"] == "1" && $data["Privacy"] != "1") {
|
||||
$checkPrivacy->addError("You have to agree to privacy policy.");
|
||||
$isValid = false;
|
||||
}
|
||||
if (isset($data["Privacy"])) {
|
||||
$checkPrivacy = $this->getElement('Privacy');
|
||||
if ($data["SupportFeedback"] == "1" && $data["Privacy"] != "1") {
|
||||
$checkPrivacy->addError(_("You have to agree to privacy policy."));
|
||||
$isValid = false;
|
||||
}
|
||||
}
|
||||
|
||||
return $isValid;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue