mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
69 lines
2.3 KiB
HTML
69 lines
2.3 KiB
HTML
<?php print_simple_box_start('center', '70%'); ?>
|
|
<form method="post" action="timezones.php">
|
|
<p><input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>"></p>
|
|
|
|
<table style="width: 100%;">
|
|
<tbody>
|
|
<tr>
|
|
<td style="vertical-align: top; width: 40%;">
|
|
<div style="text-align: center;">
|
|
<?php if (!empty($presets)) {
|
|
echo '<select style="width: 100%;" id="dstselectmenu" size="10" name="preset" onchange="showdstinfo();">';
|
|
foreach($presets as $id => $preset) {
|
|
echo '<option value="'.$id.'">'.$preset->name.'</option>';
|
|
}
|
|
echo '</select>';
|
|
}
|
|
else {
|
|
echo get_string('emptydstlist', 'admin');
|
|
}
|
|
?>
|
|
</div>
|
|
</td>
|
|
<td style="vertical-align: middle;text-align: center;">
|
|
<div id="dstdisplayboard"> </div>
|
|
<p>
|
|
<input type="submit" name="mode_add" value="<?php print_string('add'); ?>..." />
|
|
<input type="submit" name="mode_edit" value="<?php print_string('edit'); ?>" <?php if(empty($presets)) echo 'disabled="disabled"';?> />
|
|
<input type="submit" name="mode_delete" value="<?php print_string('delete'); ?>" <?php if(empty($presets)) echo 'disabled="disabled"';?> />
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</form>
|
|
<?php print_simple_box_end(); ?>
|
|
|
|
<form method="post" action="calendar.php">
|
|
<p style="text-align: center;"><input type="submit" value="<?php print_string('returntocalendaroptions', 'admin'); ?>"></p>
|
|
</form>
|
|
|
|
<script type="text/javascript">
|
|
<!--
|
|
var DSTPresetInfo = new Array();
|
|
<?php
|
|
if(!empty($presetdescriptions)) {
|
|
foreach($presetdescriptions as $id => $desc) {
|
|
echo 'DSTPresetInfo['.$id.'] = "'.$desc.'";';
|
|
}
|
|
}
|
|
?>
|
|
|
|
function showdstinfo() {
|
|
var board = document.getElementById('dstdisplayboard');
|
|
var select = document.getElementById('dstselectmenu');
|
|
if(board && select) {
|
|
var index = select.selectedIndex;
|
|
if(index == -1 && select.options.length >= 1) {
|
|
select.selectedIndex = index = 0;
|
|
}
|
|
board.firstChild.nodeValue = window.DSTPresetInfo[select.options[index].value];
|
|
board.style.display = 'block';
|
|
}
|
|
return true;
|
|
}
|
|
|
|
showdstinfo();
|
|
-->
|
|
</script>
|