1019fdd1269e92aaaad77f0f917f2cc8241ba722
[atutor.git] / docs / themes / mobile / instructor / faq / edit_question.tmpl.php
1 <?php global $stripslashes;
2 ?>
3
4 <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">
5 <input type="hidden" name="id" value="<?php echo $this->row['entry_id']; ?>" />
6
7 <div class="input-form">
8         <fieldset class="group_form"><legend class="group_form"><?php echo _AT('create_new_file'); ?></legend>
9         <div class="row">
10                 
11                 <span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="topic"><?php  echo _AT('topic'); ?></label><br />
12                 <select name="topic_id" id="topic">
13                 <?php if(!empty($this->faq_topics)):?>
14                         <?php foreach($this->faq_topics as $topic_row):?>
15                                 <option value="<?php echo $topic_row['topic_id']; ?>"<?php if ($topic_row['topic_id'] == $row['topic_id']) { echo ' selected="selected"'; } ?>><?php echo AT_print($topic_row['name'], 'input.text'); ?></option>                       
16                         <?php endforeach;?>             
17                 <?php endif;?>
18                 </select>
19         </div>
20
21         <div class="row">
22                 <span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="question"><?php echo _AT('question'); ?>:</label><br />
23                 <input type="text" name="question" size="40" id="question" value="<?php if (isset ($_POST['question'])) { echo AT_print($stripslashes($_POST['question']), 'input.text'); } else { echo AT_print($this->row['question'], 'input.text'); } ?>" />
24         </div>
25
26         <div class="row">
27                 <span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="answer"><?php  echo _AT('answer'); ?></label><br />
28                 <textarea name="answer" cols="45" rows="3" id="answer" style="width:90%;"><?php if (isset ($_POST['answer'])) { echo AT_print($stripslashes($_POST['answer']), 'input.text'); } else { echo AT_print($this->row['answer'], 'input.text'); } ?></textarea>
29         </div>
30
31         <div class="row buttons">
32                 <input type="submit" name="submit" value="<?php echo _AT('save'); ?>" accesskey="s" />
33                 <input type="submit" name="cancel" value="<?php echo _AT('cancel'); ?> " />
34         </div>
35         </fieldset>
36 </div>
37 </form>