diff --git a/README b/README
index 0c003c7e7..d83dbde3b 100644
--- a/README
+++ b/README
@@ -43,7 +43,7 @@ For installation from git on Debian wheezy, run:
Quick links to our resources
----------------------------
-User manuals: http://www.sourcefabric.org/en/airtime/manuals/
+User manual: http://sourcefabric.booktype.pro/airtime-25-for-broadcasters/
Forums and mailing lists: http://forum.sourcefabric.org
Bug tracker: http://dev.sourcefabric.org
Source code: http://github.com/sourcefabric/Airtime
diff --git a/airtime_mvc/application/configs/constants.php b/airtime_mvc/application/configs/constants.php
index 81b9040b7..818e868b5 100644
--- a/airtime_mvc/application/configs/constants.php
+++ b/airtime_mvc/application/configs/constants.php
@@ -11,7 +11,7 @@ define('COMPANY_SITE_URL' , 'http://sourcefabric.org/');
define('WHOS_USING_URL' , 'http://sourcefabric.org/en/airtime/whosusing');
define('TERMS_AND_CONDITIONS_URL' , 'http://www.sourcefabric.org/en/about/policy/');
define('PRIVACY_POLICY_URL' , 'http://www.sourcefabric.org/en/about/policy/');
-define('USER_MANUAL_URL' , 'http://www.sourcefabric.org/en/airtime/manuals/');
+define('USER_MANUAL_URL' , 'http://sourcefabric.booktype.pro/airtime-25-for-broadcasters/');
define('LICENSE_VERSION' , 'GNU AGPL v.3');
define('LICENSE_URL' , 'http://www.gnu.org/licenses/agpl-3.0-standalone.html');
diff --git a/airtime_mvc/application/configs/navigation.php b/airtime_mvc/application/configs/navigation.php
index e25fb7900..14438bdfe 100644
--- a/airtime_mvc/application/configs/navigation.php
+++ b/airtime_mvc/application/configs/navigation.php
@@ -128,7 +128,7 @@ $pages = array(
),
array(
'label' => _('User Manual'),
- 'uri' => "http://www.sourcefabric.org/en/airtime/manuals/",
+ 'uri' => "http://sourcefabric.booktype.pro/airtime-25-for-broadcasters/",
'target' => "_blank"
),
array(
diff --git a/airtime_mvc/application/controllers/PreferenceController.php b/airtime_mvc/application/controllers/PreferenceController.php
index 7106e6f89..c05929781 100644
--- a/airtime_mvc/application/controllers/PreferenceController.php
+++ b/airtime_mvc/application/controllers/PreferenceController.php
@@ -32,15 +32,11 @@ class PreferenceController extends Zend_Controller_Action
$form = new Application_Form_Preferences();
$values = array();
- if ($request->isPost()) {
- $params = $request->getPost();
- $postData = explode('&', $params['data']);
- foreach($postData as $k=>$v) {
- $v = explode('=', $v);
- $values[$v[0]] = urldecode($v[1]);
- }
- if ($form->isValid($values)) {
+ if ($request->isPost()) {
+ $values = $request->getPost();
+ if ($form->isValid($values))
+ {
Application_Model_Preference::SetHeadTitle($values["stationName"], $this->view);
Application_Model_Preference::SetDefaultCrossfadeDuration($values["stationDefaultCrossfadeDuration"]);
Application_Model_Preference::SetDefaultFadeIn($values["stationDefaultFadeIn"]);
@@ -50,6 +46,11 @@ class PreferenceController extends Zend_Controller_Action
Application_Model_Preference::SetDefaultTimezone($values["timezone"]);
Application_Model_Preference::SetWeekStartDay($values["weekStartDay"]);
+ $logoUploadElement = $form->getSubForm('preferences_general')->getElement('stationLogo');
+ $logoUploadElement->receive();
+ $imagePath = $logoUploadElement->getFileName();
+ Application_Model_Preference::SetStationLogo($imagePath);
+
Application_Model_Preference::SetUploadToSoundcloudOption($values["UploadToSoundcloudOption"]);
Application_Model_Preference::SetSoundCloudDownloadbleOption($values["SoundCloudDownloadbleOption"]);
Application_Model_Preference::SetSoundCloudUser($values["SoundCloudUser"]);
@@ -61,12 +62,14 @@ class PreferenceController extends Zend_Controller_Action
$this->view->statusMsg = "
". _("Preferences updated.")."
";
$this->view->form = $form;
- $this->_helper->json->sendJson(array("valid"=>"true", "html"=>$this->view->render('preference/index.phtml')));
+ //$this->_helper->json->sendJson(array("valid"=>"true", "html"=>$this->view->render('preference/index.phtml')));
} else {
$this->view->form = $form;
- $this->_helper->json->sendJson(array("valid"=>"false", "html"=>$this->view->render('preference/index.phtml')));
+ //$this->_helper->json->sendJson(array("valid"=>"false", "html"=>$this->view->render('preference/index.phtml')));
}
}
+ $this->view->logoImg = Application_Model_Preference::GetStationLogo();
+
$this->view->form = $form;
}
@@ -90,13 +93,9 @@ class PreferenceController extends Zend_Controller_Action
Application_Model_Preference::SetEmail($values["Email"]);
Application_Model_Preference::SetStationWebSite($values["StationWebSite"]);
- $form->Logo->receive();
- $imagePath = $form->Logo->getFileName();
-
Application_Model_Preference::SetStationCountry($values["Country"]);
Application_Model_Preference::SetStationCity($values["City"]);
Application_Model_Preference::SetStationDescription($values["Description"]);
- Application_Model_Preference::SetStationLogo($imagePath);
if (isset($values["Privacy"])) {
Application_Model_Preference::SetPrivacyPolicyCheck($values["Privacy"]);
}
@@ -104,10 +103,6 @@ class PreferenceController extends Zend_Controller_Action
$this->view->statusMsg = ""._("Support setting updated.")."
";
}
- $logo = Application_Model_Preference::GetStationLogo();
- if ($logo) {
- $this->view->logoImg = $logo;
- }
$privacyChecked = false;
if (Application_Model_Preference::GetPrivacyPolicyCheck() == 1) {
$privacyChecked = true;
diff --git a/airtime_mvc/application/forms/GeneralPreferences.php b/airtime_mvc/application/forms/GeneralPreferences.php
index fd1e00a7a..420c2af71 100644
--- a/airtime_mvc/application/forms/GeneralPreferences.php
+++ b/airtime_mvc/application/forms/GeneralPreferences.php
@@ -1,11 +1,14 @@
setEnctype(Zend_Form::ENCTYPE_MULTIPART);
$notEmptyValidator = Application_Form_Helper_ValidationTypes::overrideNotEmptyValidator();
$rangeValidator = Application_Form_Helper_ValidationTypes::overrideBetweenValidator(0, 59.9);
@@ -34,6 +37,18 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
$stationDescription->setAttrib('rows', 4);
$this->addElement($stationDescription);
+ // Station Logo
+ $stationLogoUpload = new Zend_Form_Element_File('stationLogo');
+ $stationLogoUpload->setLabel(_('Station Logo:'))
+ ->setDescription(_("Note: Anything larger than 600x600 will be resized."))
+ ->setRequired(false)
+ ->addValidator('Count', false, 1)
+ ->addValidator('Extension', false, 'jpg,jpeg,png,gif')
+ ->setMaxFileSize(1000000)
+ ->addFilter('ImageSize');
+ $stationLogoUpload->setAttrib('accept', 'image/*');
+ $this->addElement($stationLogoUpload);
+
//Default station crossfade duration
$this->addElement('text', 'stationDefaultCrossfadeDuration', array(
'class' => 'input_text',
diff --git a/airtime_mvc/application/forms/Preferences.php b/airtime_mvc/application/forms/Preferences.php
index f667c7bab..3e5158413 100644
--- a/airtime_mvc/application/forms/Preferences.php
+++ b/airtime_mvc/application/forms/Preferences.php
@@ -6,8 +6,6 @@ class Application_Form_Preferences extends Zend_Form
{
$baseUrl = Application_Common_OsPath::getBaseDir();
- $this->setMethod('post');
-
$this->setDecorators(array(
array('ViewScript', array('viewScript' => 'form/preferences.phtml'))
));
@@ -26,5 +24,12 @@ class Application_Form_Preferences extends Zend_Form
$soundcloud_pref = new Application_Form_SoundcloudPreferences();
$this->addSubForm($soundcloud_pref, 'preferences_soundcloud');
+ $submit = new Zend_Form_Element_Submit('submit');
+ $submit->setLabel(_('Save'));
+ //$submit->removeDecorator('Label');
+ $submit->setAttribs(array('class'=>'btn right-floated'));
+ $submit->removeDecorator('DtDdWrapper');
+
+ $this->addElement($submit);
}
}
diff --git a/airtime_mvc/application/forms/SupportSettings.php b/airtime_mvc/application/forms/SupportSettings.php
index 468345a1f..e582f407b 100644
--- a/airtime_mvc/application/forms/SupportSettings.php
+++ b/airtime_mvc/application/forms/SupportSettings.php
@@ -1,7 +1,5 @@
setAttrib('COLS','58');
$this->addElement($description);
- // Station Logo
- $upload = new Zend_Form_Element_File('Logo');
- $upload->setLabel(_('Station Logo:'))
- ->setRequired(false)
- ->setDecorators(array('File'))
- ->addValidator('Count', false, 1)
- ->addValidator('Extension', false, 'jpg,jpeg,png,gif')
- ->addFilter('ImageSize');
- $upload->setAttrib('accept', 'image/*');
- $this->addElement($upload);
-
//enable support feedback
$this->addElement('checkbox', 'SupportFeedback', array(
'label' => _('Send support feedback'),
diff --git a/airtime_mvc/application/views/scripts/form/preferences.phtml b/airtime_mvc/application/views/scripts/form/preferences.phtml
index 475f86928..0ffe1ea9d 100644
--- a/airtime_mvc/application/views/scripts/form/preferences.phtml
+++ b/airtime_mvc/application/views/scripts/form/preferences.phtml
@@ -1,5 +1,9 @@
diff --git a/airtime_mvc/application/views/scripts/form/preferences_general.phtml b/airtime_mvc/application/views/scripts/form/preferences_general.phtml
index 2cbe40c78..d884a7d55 100644
--- a/airtime_mvc/application/views/scripts/form/preferences_general.phtml
+++ b/airtime_mvc/application/views/scripts/form/preferences_general.phtml
@@ -5,6 +5,10 @@
element->getElement('stationDescription')->render() ?>
+ element->getElement('stationLogo')->render() ?>
+
+
+
element->getElement('locale')->render() ?>
element->getElement('timezone')->render() ?>
diff --git a/airtime_mvc/application/views/scripts/form/support-setting.phtml b/airtime_mvc/application/views/scripts/form/support-setting.phtml
index c22f83ec8..b76343b8e 100644
--- a/airtime_mvc/application/views/scripts/form/support-setting.phtml
+++ b/airtime_mvc/application/views/scripts/form/support-setting.phtml
@@ -97,25 +97,5 @@
-
-
-
-
- element->getView()->logoImg){?>
-
-
-
- element->getElement('Logo') ?>
-
- element->getElement('Logo')->hasErrors()) : ?>
-
- element->getElement('Logo')->getMessages() as $error): ?>
-
-
-
-
-
diff --git a/airtime_mvc/application/views/scripts/preference/index.phtml b/airtime_mvc/application/views/scripts/preference/index.phtml
index 7d84200b4..147cd1b99 100644
--- a/airtime_mvc/application/views/scripts/preference/index.phtml
+++ b/airtime_mvc/application/views/scripts/preference/index.phtml
@@ -1,16 +1,15 @@
diff --git a/airtime_mvc/locale/az/LC_MESSAGES/airtime.mo b/airtime_mvc/locale/az/LC_MESSAGES/airtime.mo
index 6785de678..b09021a2c 100644
Binary files a/airtime_mvc/locale/az/LC_MESSAGES/airtime.mo and b/airtime_mvc/locale/az/LC_MESSAGES/airtime.mo differ
diff --git a/airtime_mvc/locale/de_AT/LC_MESSAGES/airtime.mo b/airtime_mvc/locale/de_AT/LC_MESSAGES/airtime.mo
index 76942ed77..e07f4df00 100644
Binary files a/airtime_mvc/locale/de_AT/LC_MESSAGES/airtime.mo and b/airtime_mvc/locale/de_AT/LC_MESSAGES/airtime.mo differ
diff --git a/airtime_mvc/locale/en_GB/LC_MESSAGES/airtime.mo b/airtime_mvc/locale/en_GB/LC_MESSAGES/airtime.mo
index 4ca8d6170..9e6d68da7 100644
Binary files a/airtime_mvc/locale/en_GB/LC_MESSAGES/airtime.mo and b/airtime_mvc/locale/en_GB/LC_MESSAGES/airtime.mo differ
diff --git a/airtime_mvc/locale/fr_FR/LC_MESSAGES/airtime.mo b/airtime_mvc/locale/fr_FR/LC_MESSAGES/airtime.mo
index 6a2e72329..c07671388 100644
Binary files a/airtime_mvc/locale/fr_FR/LC_MESSAGES/airtime.mo and b/airtime_mvc/locale/fr_FR/LC_MESSAGES/airtime.mo differ
diff --git a/airtime_mvc/locale/hy_AM/LC_MESSAGES/airtime.mo b/airtime_mvc/locale/hy_AM/LC_MESSAGES/airtime.mo
index 114eb85d3..76a62ff71 100644
Binary files a/airtime_mvc/locale/hy_AM/LC_MESSAGES/airtime.mo and b/airtime_mvc/locale/hy_AM/LC_MESSAGES/airtime.mo differ
diff --git a/airtime_mvc/locale/ka/LC_MESSAGES/airtime.mo b/airtime_mvc/locale/ka/LC_MESSAGES/airtime.mo
index 1cd4bb1ac..6411fcaf9 100644
Binary files a/airtime_mvc/locale/ka/LC_MESSAGES/airtime.mo and b/airtime_mvc/locale/ka/LC_MESSAGES/airtime.mo differ
diff --git a/airtime_mvc/locale/pt_BR/LC_MESSAGES/airtime.mo b/airtime_mvc/locale/pt_BR/LC_MESSAGES/airtime.mo
index abd94d09d..8267a2179 100644
Binary files a/airtime_mvc/locale/pt_BR/LC_MESSAGES/airtime.mo and b/airtime_mvc/locale/pt_BR/LC_MESSAGES/airtime.mo differ
diff --git a/airtime_mvc/public/css/styles.css b/airtime_mvc/public/css/styles.css
index 483468adb..ccd5f201f 100644
--- a/airtime_mvc/public/css/styles.css
+++ b/airtime_mvc/public/css/styles.css
@@ -2121,6 +2121,7 @@ span.errors.sp-errors{
}
.preferences {
width: 500px;
+ margin-bottom: 40px;
}
.manage-folders {
width: 610px;
diff --git a/airtime_mvc/public/js/airtime/preferences/preferences.js b/airtime_mvc/public/js/airtime/preferences/preferences.js
index 57b5e3448..49db6e344 100644
--- a/airtime_mvc/public/js/airtime/preferences/preferences.js
+++ b/airtime_mvc/public/js/airtime/preferences/preferences.js
@@ -120,7 +120,8 @@ $(document).ready(function() {
$(this).toggleClass("closed");
return false;
}).next().hide();
-
+
+ /* No longer using AJAX for this form. Zend + our code makes it needlessly hard to deal with. -- Albert
$('#pref_save').live('click', function() {
var data = $('#pref_form').serialize();
var url = baseUrl+'Preference/index';
@@ -133,7 +134,7 @@ $(document).ready(function() {
setConfigureMailServerListener();
setEnableSystemEmailsListener();
});
- });
+ });*/
showErrorSections();