Changeset 708
- Timestamp:
- 11/26/08 14:04:26 (1 year ago)
- Files:
-
- 0.5/library/kumbia/generator/components.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
0.5/library/kumbia/generator/components.php
r704 r708 484 484 static function build_time_component($com, $name, $form){ 485 485 $arr = array(); 486 if(!$_REQUEST["fl_$name"]&&$com['value']){487 $_REQUEST["fl_$name"] = $com['value'];488 }489 if($_REQUEST["fl_$name"]){490 ereg("([0-2][0-9]):([0-5][0-8])", $_REQUEST["fl_$name"], $arr);491 }492 486 Generator::forms_print("<label for='flid_$name'><strong>".$com['caption']." :</strong></label></td><td>\n"); 493 487 Generator::forms_print("<select name='time{$name}_hour' id='time{$name}_hour' 494 488 onchange='document.getElementById(\"flid_$name\").value = document.getElementById(\"time{$name}_hour\").options[document.getElementById(\"time{$name}_hour\").selectedIndex].value+\":\"+document.getElementById(\"time{$name}_minutes\").options[document.getElementById(\"time{$name}_minutes\").selectedIndex].value' disabled='disabled'>\n"); 495 489 for($i=0;$i<=23;$i++){ 496 if($arr[1]!=sprintf("%02s", $i)){ 497 Generator::forms_print("<option value='".sprintf("%02s", $i)."'>".sprintf("%02s", $i)."</option>\n"); 498 } else { 499 Generator::forms_print("<option value='".sprintf("%02s", $i)."' selected='selected'>".sprintf("%02s", $i)."</option>\n"); 500 } 490 Generator::forms_print("<option value='".sprintf("%02s", $i)."' selected='selected'>".sprintf("%02s", $i)."</option>\n"); 501 491 } 502 492 Generator::forms_print("</select>:"); … … 504 494 onchange='document.getElementById(\"flid_$name\").value = document.getElementById(\"time{$name}_hour\").options[document.getElementById(\"time{$name}_hour\").selectedIndex].value+\":\"+document.getElementById(\"time{$name}_minutes\").options[document.getElementById(\"time{$name}_minutes\").selectedIndex].value' disabled='disabled'>\n"); 505 495 for($i=0;$i<=59;$i++){ 506 if($arr[2]!=sprintf("%02s", $i)){ 507 Generator::forms_print("<option value='".sprintf("%02s", $i)."'>".sprintf("%02s", $i)."</option>\n"); 508 } else { 509 Generator::forms_print("<option value='".sprintf("%02s", $i)."' selected='selected'>".sprintf("%02s", $i)."</option>\n"); 510 } 496 Generator::forms_print("<option value='".sprintf("%02s", $i)."' selected='selected'>".sprintf("%02s", $i)."</option>\n"); 511 497 } 512 498 Generator::forms_print("</select>");