Added new variable in the field of star_time and end_time to define interval 5 minutes

skala
Ricardo Rodriguez 16 years ago
parent ceb0780732
commit 77617d6505
  1. 4
      main/exercice/exercise.class.php
  2. 6
      main/inc/lib/formvalidator/Element/datepicker.php

@ -1009,8 +1009,8 @@ class Exercise
//$form -> addElement('date', 'start_time', get_lang('ExeStartTime'), array('language'=>'es','format' => 'dMYHi'));
//$form -> addElement('date', 'end_time', get_lang('ExeEndTime'), array('language'=>'es','format' => 'dMYHi'));
$form->addElement('datepicker', 'start_time', get_lang('ExeStartTime'), array('form_name'=>'exercise_admin'));
$form->addElement('datepicker', 'end_time', get_lang('ExeEndTime'), array('form_name'=>'exercise_admin'));
$form->addElement('datepicker', 'start_time', get_lang('ExeStartTime'), array('form_name'=>'exercise_admin'), 5);
$form->addElement('datepicker', 'end_time', get_lang('ExeEndTime'), array('form_name'=>'exercise_admin'), 5);
//$form -> addElement('select', 'enabletimercontroltotalminutes',get_lang('ExerciseTimerControlMinutes'),$time_minutes_option);
$form -> addElement('html','</div>');

@ -9,7 +9,7 @@ class HTML_QuickForm_datepicker extends HTML_QuickForm_date
/**
* Constructor
*/
function HTML_QuickForm_datepicker($elementName = null, $elementLabel = null, $attributes = null)
function HTML_QuickForm_datepicker($elementName = null, $elementLabel = null, $attributes = null, $optionIncrement = null)
{
$js_form_name = $attributes['form_name'];
unset($attributes['form_name']);
@ -38,6 +38,10 @@ class HTML_QuickForm_datepicker extends HTML_QuickForm_date
//$this->_options['addEmptyOption'] = true;
//$this->_options['emptyOptionValue'] = 0;
//$this->_options['emptyOptionText'] = ' -- ';
if (isset($optionIncrement)) {
$this->_options['optionIncrement']['i'] = intval($optionIncrement);
}
}
/**
* HTML code to display this datepicker

Loading…
Cancel
Save