Bumping version for 1.8.9 release. Thinking we might have to go to x.x.10 for the...
[moodle.git] / calendar / export_basic.html
blob235db5b26babf8bf49425a504674c64fbb142a0f
1 <fieldset>
2 <legend><?php print_string('commontasks', 'calendar'); ?></legend>
3 <form method="get" action="export_execute.php">
4 <?php print_string('iwanttoexport', 'calendar'); ?>:
5 <div class="indent">
6 <input type="radio" name="preset_what" id="pw_all" value="all" checked="checked"/><label for="pw_all"><?php print_string('eventsall', 'calendar'); ?></label><br />
7 <input type="radio" name="preset_what" id="pw_course" value="courses" /><label for="pw_course"><?php print_string('eventsrelatedtocourses', 'calendar'); ?></label><br />
8 </div>
9 <?php print_string('for', 'calendar'); ?>:
10 <div class="indent">
11 <?php if($allowthisweek) { ?>
12 <input type="radio" name="preset_time" id="pt_wknow" value="weeknow" checked="checked"/><label for="pt_wknow"><?php print_string('weekthis', 'calendar'); ?></label><br />
13 <?php } ?>
14 <?php if($allownextweek) { ?>
15 <input type="radio" name="preset_time" id="pt_wknext" value="weeknext" /><label for="pt_wknext"><?php print_string('weeknext', 'calendar'); ?></label><br />
16 <?php } ?>
17 <input type="radio" name="preset_time" id="pt_monnow" value="monthnow" /><label for="pt_monnow"><?php print_string('monththis', 'calendar'); ?></label><br />
18 <?php if($allownextmonth) { ?>
19 <input type="radio" name="preset_time" id="pt_monnext" value="monthnext" /><label for="pt_monnext"><?php print_string('monthnext', 'calendar'); ?></label><br />
20 <?php } ?>
21 <input type="radio" name="preset_time" id="pt_recupc" value="recentupcoming" /><label for="pt_recupc"><?php print_string('recentupcoming', 'calendar'); ?></label><br />
22 </div>
23 <div style="text-align: right;">
24 <input type="hidden" name="cal_d" value="" />
25 <input type="hidden" name="cal_m" value="" />
26 <input type="hidden" name="cal_y" value="" />
27 <input type="hidden" name="username" value="<?php echo $username; ?>" />
28 <input type="hidden" name="authtoken" value="<?php echo $authtoken; ?>" />
29 <script type="text/javascript">
30 //<![CDATA[
31 function generate_url() {
32 if (document.getElementById("pw_course").checked) {
33 preset_what = "courses";
34 } else {
35 preset_what = "all";
38 if (<?php echo (int) $allowthisweek; ?> && document.getElementById("pt_wknow").checked) {
39 preset_time = "weeknow";
40 } else if (<?php echo (int) $allownextweek; ?> && document.getElementById("pt_wknext").checked) {
41 preset_time = "weeknext";
42 } else if (<?php echo (int) $allownextmonth; ?> && document.getElementById("pt_monnext").checked) {
43 preset_time = "monthnext";
44 } else if (document.getElementById("pt_monnow").checked) {
45 preset_time = "monthnow";
46 } else {
47 preset_time = "recentupcoming";
50 urlstr = "<?php echo $CFG->wwwroot; ?>/calendar/export_execute.php?preset_what=" + preset_what + "&amp;preset_time=" + preset_time + "&amp;username=<?php echo $usernameencoded; ?>&amp;authtoken=<?php echo $authtoken; ?>";
51 document.getElementById("url").innerText = urlstr;
52 document.getElementById("url").innerHTML = urlstr; //Need this as well, for Firefox
54 document.getElementById("urlbox").style.display = "block";
56 //]]>
57 </script>
58 <input type="button" value="<?php print_string('generateurlbutton', 'calendar'); ?>" onclick="javascript:generate_url()" />
59 <input type="submit" value="<?php print_string('exportbutton', 'calendar'); ?>" />
60 </div>
61 </form>
62 </fieldset>
63 <div id="urlbox" style="display: none; ">
64 <p><?php print_string('urlforical', 'calendar'); ?>:</p>
65 <div id="url" style="overflow: scroll; width: 650px; "></div>
66 </div>