Merge branch '2.3.x' of dev.sourcefabric.org:airtime into 2.3.x

This commit is contained in:
Martin Konecny 2013-02-06 16:30:11 -05:00
commit d028e00cdb
3 changed files with 13 additions and 5 deletions

View File

@ -573,7 +573,10 @@ class ScheduleController extends Zend_Controller_Action
return; 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"; $this->view->action = "dj-edit-show";
} }

View File

@ -7,6 +7,7 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
{ {
$notEmptyValidator = Application_Form_Helper_ValidationTypes::overrideNotEmptyValidator(); $notEmptyValidator = Application_Form_Helper_ValidationTypes::overrideNotEmptyValidator();
$rangeValidator = Application_Form_Helper_ValidationTypes::overrideBetweenValidator(0, 59.9);
$this->setDecorators(array( $this->setDecorators(array(
array('ViewScript', array('viewScript' => 'form/preferences_general.phtml')) array('ViewScript', array('viewScript' => 'form/preferences_general.phtml'))
)); ));
@ -34,9 +35,13 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
'label' => _('Default Fade (s):'), 'label' => _('Default Fade (s):'),
'required' => true, 'required' => true,
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
'validators' => array(array($notEmptyValidator, 'regex', false, 'validators' => array(
array('/^[0-9]{1,2}(\.\d{1})?$/', array(
'messages' => _('enter a time in seconds 0{.0}')))), $rangeValidator,
$notEmptyValidator,
'regex', false, array('/^[0-9]{1,2}(\.\d{1})?$/', 'messages' => _('enter a time in seconds 0{.0}'))
)
),
'value' => $defaultFade, 'value' => $defaultFade,
'decorators' => array( 'decorators' => array(
'ViewHelper' 'ViewHelper'

View File

@ -1,3 +1,3 @@
function redirectToLogin(){ function redirectToLogin(){
window.location = baseUrl+"/Login" window.location = baseUrl+"Login"
} }