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