<?php
   if (!isset($this->config->glossary)) {
       $this->config->glossary = 0;
   }
   if (!isset($this->config->type)) {
       $this->config->type = 0;
   }
?>
<table cellpadding="9" cellspacing="0">
<tr valign="top">
<td align="right"><?php print_string("title","block_glossary_random") ?>:</td>
<td><input type="text" name="title" size="50" value="<?php p($this->config->title) ?>" /></td>
</tr>

<tr valign="top">
<td align="right"><?php print_string("select_glossary","block_glossary_random") ?>:</td>
<td><?php choose_from_menu($glossaries,"glossary",$this->config->glossary) ?></td>
</tr>

<tr valign="top">
<td align="right"><?php print_string("refresh","block_glossary_random") ?>:</td>
<td><input type="text" name="refresh" size="5" value="<?php p($this->config->refresh) ?>" /></td>
</tr>

<tr valign="top">
<td align="right"><?php print_string("type","block_glossary_random") ?>:</td>
<td><?php
     choose_from_menu($type, "type", $this->config->type, "");
     helpbutton('newentry', get_string("type","block_glossary_random"), 'glossary');
     ?></td>
</tr> 

<tr valign="top">
<td align="right"><?php print_string("showconcept","block_glossary_random") ?>:</td>
<td>
<input type="hidden" name="showconcept" value="0" />
<input type="checkbox" name="showconcept" value="1" <?php if(!empty($this->config->showconcept)) echo 'checked="checked"'; ?> />
</td>
</tr> 

<tr>
    <td colspan="2">
        <b><?php print_string("whichfooter","block_glossary_random") ?></b></td></tr>
<tr valign="top">
    <td align="right"><?php print_string("askaddentry", "block_glossary_random") ?>:</td>
    <td><input type="text" name="addentry" size="80" value="<?php p($this->config->addentry) ?>" /></td></tr>
<tr valign="top">
    <td align="right"><?php print_string("askviewglossary", "block_glossary_random") ?>:</td>
    <td><input type="text" name="viewglossary" size="80" value="<?php p($this->config->viewglossary) ?>" /></td></tr>
<tr valign="top">
    <td align="right"><?php print_string("askinvisible", "block_glossary_random") ?>:</td>
    <td><input type="text" name="invisible" size="80" value="<?php p($this->config->invisible) ?>" /></td></tr>

<tr>
    <td colspan="2" align="center"><input type="submit" value="<?php print_string("savechanges") ?>" /></td></tr>
</table>
