diff --git a/airtime_mvc/application/controllers/ScheduleController.php b/airtime_mvc/application/controllers/ScheduleController.php index 1f3216eed..1a908ec63 100644 --- a/airtime_mvc/application/controllers/ScheduleController.php +++ b/airtime_mvc/application/controllers/ScheduleController.php @@ -573,7 +573,10 @@ class ScheduleController extends Zend_Controller_Action return; } - if ($isDJ) { + // in case a user was once a dj and had been assigned to a show + // but was then changed to an admin user we need to allow + // the user to edit the show as an admin (CC-4925) + if ($isDJ && !$isAdminOrPM) { $this->view->action = "dj-edit-show"; } diff --git a/airtime_mvc/application/forms/GeneralPreferences.php b/airtime_mvc/application/forms/GeneralPreferences.php index 48a561b06..3d249ce47 100644 --- a/airtime_mvc/application/forms/GeneralPreferences.php +++ b/airtime_mvc/application/forms/GeneralPreferences.php @@ -7,6 +7,7 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm { $notEmptyValidator = Application_Form_Helper_ValidationTypes::overrideNotEmptyValidator(); + $rangeValidator = Application_Form_Helper_ValidationTypes::overrideBetweenValidator(0, 59.9); $this->setDecorators(array( array('ViewScript', array('viewScript' => 'form/preferences_general.phtml')) )); @@ -34,9 +35,13 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm 'label' => _('Default Fade (s):'), 'required' => true, 'filters' => array('StringTrim'), - 'validators' => array(array($notEmptyValidator, 'regex', false, - array('/^[0-9]{1,2}(\.\d{1})?$/', - 'messages' => _('enter a time in seconds 0{.0}')))), + 'validators' => array( + array( + $rangeValidator, + $notEmptyValidator, + 'regex', false, array('/^[0-9]{1,2}(\.\d{1})?$/', 'messages' => _('enter a time in seconds 0{.0}')) + ) + ), 'value' => $defaultFade, 'decorators' => array( 'ViewHelper' diff --git a/airtime_mvc/public/js/airtime/login/password-restore.js b/airtime_mvc/public/js/airtime/login/password-restore.js index 04d78f98b..4b45a59ff 100644 --- a/airtime_mvc/public/js/airtime/login/password-restore.js +++ b/airtime_mvc/public/js/airtime/login/password-restore.js @@ -1,3 +1,3 @@ function redirectToLogin(){ - window.location = baseUrl+"/Login" + window.location = baseUrl+"Login" } \ No newline at end of file