Merge commit 'catalyst/MOODLE_19_STABLE' into mdl19-linuxchix
[moodle-linuxchix.git] / blocks / tag_youtube / config_instance.html
blobcf5157f0459e031c77fe2bcd909b1791421cdcb6
1 <table cellpadding="9" cellspacing="0">
2 <tr valign="top">
3 <td align="right"><?php print_string('configtitle', 'block_tag_youtube'); ?>:</td>
4 <td><input type="text" name="title" size="30" value="<?php echo isset($this->config->title)?p($this->config->title):''; ?>" /></td>
5 </tr>
6 <tr valign="top">
7 <td align="right"><?php print_string('numberofvideos', 'block_tag_youtube'); ?>:</td>
8 <td>
9 <input type="text" name="numberofvideos" size="5" value="<?php echo isset($this->config->numberofvideos)?p($this->config->numberofvideos):''; ?>" />
10 </td>
11 </tr>
12 <tr valign="top">
13 <td align="right"><?php print_string('category', 'block_tag_youtube'); ?>:</td>
14 <td>
15 <?php
16 if (isset($this->config) && isset($this->config->category)) {
17 $selected = $this->config->category;
18 } else {
19 $selected = 0;
21 /* http://youtube.com/dev_api_ref?m=youtube.videos.list_by_category_and_tag */
22 $options = array ( 0 => get_string('anycategory', 'block_tag_youtube'),
23 1 => get_string('filmsanimation', 'block_tag_youtube'),
24 2 => get_string('autosvehicles', 'block_tag_youtube'),
25 23 => get_string('comedy', 'block_tag_youtube'),
26 24 => get_string('entertainment', 'block_tag_youtube'),
27 10 => get_string('music', 'block_tag_youtube'),
28 25 => get_string('newspolitics', 'block_tag_youtube'),
29 22 => get_string('peopleblogs', 'block_tag_youtube'),
30 15 => get_string('petsanimals', 'block_tag_youtube'),
31 26 => get_string('howtodiy', 'block_tag_youtube'),
32 17 => get_string('sports', 'block_tag_youtube'),
33 19 => get_string('travel', 'block_tag_youtube'),
34 20 => get_string('gadgetsgames', 'block_tag_youtube'),
37 choose_from_menu ($options, 'category', $selected);
38 ?>
39 </td>
40 </tr>
41 <tr valign="top">
42 <td align="right">
43 <?php print_string('includeonlyvideosfromplaylist', 'block_tag_youtube'); ?>
44 </td>
45 <td><input type="text" name="playlist" size="20" value="<?php echo isset($this->config->playlist)?p($this->config->playlist):''; ?>" /></td>
46 </tr>
47 <tr>
48 <td colspan="3" align="center">
49 <input type="submit" value="<?php print_string('savechanges') ?>" /></td>
50 </tr>
51 </table>