}
//
-function addSelectionBox ($type, $default, $prefix = '', $id = NULL, $class = 'form_select') {
+function addSelectionBox ($type, $default, $prefix = '', $id = NULL, $class = 'form_select', $allSteps = FALSE) {
$OUT = '';
if ($type == 'yn') {
case 'mi': // Minutes
case 'se': // Seconds
- for ($idx = 0; $idx <= 59; $idx+=5) {
+ // Default is 5 minutes/seconds step
+ $step = 5;
+
+ // All steps?
+ if ($allSteps === TRUE) {
+ // Then all steps
+ $step = 1;
+ } // END - if
+
+ for ($idx = 0; $idx <= 59; $idx += $step) {
$padded = padLeftZero($idx, 2);
$OUT .= '<option value="' . $padded . '"';
if ($default == $padded) $OUT .= ' selected="selected"';
}
// Create selection box or array of splitted timestamp
-function createTimeSelections ($timestamp, $prefix = '', $display = '', $align = 'center', $asArray = FALSE) {
+function createTimeSelections ($timestamp, $prefix = '', $display = '', $align = 'center', $asArray = FALSE, $allSteps = FALSE) {
// Do not continue if ONE_DAY is absend
if (!isConfigEntrySet('ONE_DAY')) {
// Abort here
if (isInString($unit, $display) || (empty($display))) {
// Generate year selection
$OUT .= '<td align="center">';
- $OUT .= addSelectionBox($field, $data[$unit], $prefix, NULL, 'mini_select');
+ $OUT .= addSelectionBox($field, $data[$unit], $prefix, NULL, 'mini_select', $allSteps);
$OUT .= '</td>';
} else {
$OUT .= '<input type="hidden" name="' . $prefix . '_' . $field . '" value="0" />';