The beginnings of the simplified-desktop theme
[atutor.git] / docs / themes / default / instructor / glossary / edit.tmpl.php
1 <?php global $stripslashes; ?>
2 <?php debug($result_related);?>
3 <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">
4 <input type="hidden" name="gid" value="<?php echo $this->gid; ?>" />
5
6 <div class="input-form">
7         <fieldset class="group_form"><legend class="group_form"><?php echo _AT('edit_glossary'); ?></legend>
8         <div class="row">
9                 <span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="title"><?php echo _AT('glossary_term');  ?></label><br/ >
10                 <input type="text" name="word" size="40" id="title" value="<?php echo htmlentities_utf8($stripslashes($row['word'])); ?>" />
11         </div>
12
13         <div class="row">
14                 <span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="body"><?php echo _AT('glossary_definition'); ?></label><br />
15                 <textarea name="definition" cols="55" rows="7" id="body"><?php echo htmlentities_utf8($row['definition']); ?></textarea>
16         </div>
17
18         <div class="row">
19                 <?php echo _AT('glossary_related');  ?><br />
20         <?php
21                 
22                 if ($row_g = mysql_fetch_array($this->result_related)) {
23                         echo '<select name="related_term">';
24                         echo '<option value="0"></option>';
25                         do {
26                                 if ($row_g['word_id'] == $row['word_id']) {
27                                         continue;
28                                 }
29                 
30                                 echo '<option value="'.$row_g['word_id'].'"';
31                         
32                                 if ($row_g['word_id'] == $row['related_word_id']) {
33                                         echo ' selected="selected" ';
34                                 }
35                         
36                                 echo '>'.htmlentities_utf8($row_g['word']).'</option>';
37                         } while ($row_g = mysql_fetch_array($result));
38                         
39                         echo '</select>';
40                 
41                 } else {
42                         echo  _AT('no_glossary_items');
43                 }
44         ?>
45         </div>
46         <div class="row buttons">
47                 <input type="submit" name="submit" value="<?php echo _AT('save'); ?>" accesskey="s" />
48                 <input type="submit" name="cancel" value="<?php echo _AT('cancel');  ?>" />
49         </div>
50         </fieldset>
51 </div>
52 </form>