remove old readme
[atutor.git] / docs / themes / simplified-desktop / instructor / glossary / add.tmpl.php
1 <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">
2 <input type="hidden" name="num_terms" value="<?php echo $this->num_terms; ?>" />
3 <?php
4 for ($i=0;$i<$this->num_terms;$i++) {
5         if ($glossary[$word[$i]] != '') {
6                 echo '<input type="hidden" name="ignore['.$i.']" value="1" />';
7                 continue;
8         }
9         
10         for ($j=0;$j<$i;$j++) {
11                 if ($word[$j] == $word[$i]) {
12                         echo '<input type="hidden" name="ignore['.$i.']" value="1" />';
13                         continue 2;
14                 }
15         }
16
17         if ($word[$i] == '') {
18                 $word[$i] = ContentManager::cleanOutput($_POST['word'][$i]);
19         }
20 ?>
21 <div class="input-form">
22         <fieldset class="group_form"><legend class="group_form"><?php echo _AT('add_glossary'); ?></legend>
23         <div class="row">
24                 <span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="title<?php echo $i; ?>"><?php echo _AT('glossary_term');  ?></label><br />
25                 <input type="text" name="word[<?php echo $i; ?>]" size="30" value="<?php echo trim($word[$i]); ?>" id="title<?php echo $i; ?>" /><?php                  
26                 if ($_GET['pcid'] != '') { 
27                         echo '<input type="checkbox" name="ignore['.$i.']" value="1" id="ig'.$i.'" /><label for="ig'.$i.'">Ignore this term</label>.';  
28                 }
29                 ?>
30         </div>
31
32         <div class="row">
33                 <span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="body<?php echo $i; ?>"><?php echo _AT('glossary_definition');  ?></label><br />
34                 <textarea name="definition[<?php echo $i; ?>]" class="formfield" cols="55" rows="7" id="body<?php echo $i; ?>" style="width:90%;"><?php echo ContentManager::cleanOutput($_POST['definition'][$i]); ?></textarea>
35         </div>
36
37         <div class="row">
38         <?php echo _AT('glossary_related');  ?><br />
39         <?php
40                         
41                         if ($row_g = mysql_fetch_assoc($this->result_glossary)) {
42                                 echo '<select name="related_term['.$i.']">';
43                                 echo '<option value="0"></option>';
44                                 do {
45                                         echo '<option value="'.$row_g['word_id'].'">'.$row_g['word'].'</option>';
46                                 } while ($row_g = mysql_fetch_assoc($this->result_glossary));
47                                 echo '</select>';
48                         } else {
49                                 echo _AT('none_available');
50                         }
51                 } // endfor
52         ?>
53         </div>
54
55         <div class="row buttons">
56                 <input type="submit" name="submit" value="<?php echo _AT('save'); ?>" accesskey="s" />
57                 <input type="submit" name="cancel" value="<?php echo _AT('cancel'); ?>" />
58         </div>
59         </fieldset>
60 </div>
61 </form>