Too many bugs, not enough time!
[moodle.git] / mod / forum / post.html
blob5a85c18c44ef3aa2fc4f555569e09279b2daa991
1 <form name="theform" method="post" action="post.php" enctype="multipart/form-data">
2 <table border="0" cellpadding="5">
3 <tr valign="top">
4 <td align=right><p><b><?php print_string("subject", "forum"); ?>:</b></p></td>
5 <td>
6 <input type="text" name="subject" size=60 value="<?php p($post->subject) ?>">
7 </td>
8 </tr>
9 <tr valign="top">
10 <td align=right><p><b>
11 <?php print_string("message", "forum"); ?>:
12 </b></p></td>
13 <td align=left rowspan=2>
14 <?php print_textarea($usehtmleditor, 25, 65, 630, 400, "message", $post->message); ?>
15 </td>
16 </tr>
17 <tr valign="top">
18 <td align="right" valign="center" nowrap>
20 <font SIZE="1">
21 <?php
22 helpbutton("reading", get_string("helpreading"), "moodle", true, true);
23 echo "<br />";
24 helpbutton("writing", get_string("helpwriting"), "moodle", true, true);
25 echo "<br />";
26 helpbutton("questions", get_string("helpquestions"), "moodle", true, true);
27 echo "<br />";
28 if ($usehtmleditor) {
29 helpbutton("richtext", get_string("helprichtext"), "moodle", true, true);
30 } else {
31 emoticonhelpbutton("theform", "message");
34 <br />
35 </font>
37 </td>
38 </tr>
42 <tr valign=top>
43 <td align=right><p><b><?php print_string("formattexttype"); ?>:</b></p></td>
44 <td>
45 <?php
46 if ($usehtmleditor) { /// Trying this out for a while
47 print_string('formathtml');
48 echo '<input type="hidden" name="format" value="'.FORMAT_HTML.'">';
49 } else {
50 choose_from_menu(format_text_menu(), "format", $post->format, "");
52 helpbutton("textformat", get_string("helpformatting"));
54 </td>
55 </tr>
58 <tr valign=top>
59 <td align=right><p><b><?php print_string("subscription", "forum") ?>:</b></p></td>
60 <td>
61 <?php
62 if ($forum->forcesubscribe) {
63 print_string("everyoneissubscribed", "forum");
64 } else {
65 unset($options);
66 if (forum_is_subscribed($USER->id, $post->forum)) {
67 $options[0] = get_string("subscribestart", "forum");
68 $options[1] = get_string("subscribestop", "forum");
69 choose_from_menu($options, "unsubscribe", 0, "");
70 } else {
71 $default = 0;
72 if (!empty($USER->autosubscribe)) {
73 $default = 1;
75 $options[0] = get_string("subscribestop", "forum");
76 $options[1] = get_string("subscribestart", "forum");
77 choose_from_menu($options, "subscribe", $default, "");
80 helpbutton("subscription", get_string("subscription", "forum"), "forum");
82 </td>
83 </tr>
86 <tr valign=top>
87 <td align=right><p><b><?php print_string("attachment", "forum") ?>:<br />(<?php print_string("optional") ?>)&nbsp;</b></p></td>
88 <td>
89 <?php $maxbytes = get_max_upload_file_size($CFG->maxbytes, $course->maxbytes, $forum->maxbytes); ?>
90 <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $maxbytes ?>">
91 <input type="file" name="attachment" size=40>
92 <?php
93 helpbutton("attachment", get_string("attachment", "forum"), "forum");
94 print_string("maxsize", "", display_size($maxbytes));
96 </td>
98 </tr>
101 <tr>
102 <td align=center colspan=2>
103 <input type="hidden" name=course value="<?php p($post->course) ?>">
104 <input type="hidden" name=forum value="<?php p($post->forum) ?>">
105 <input type="hidden" name=discussion value="<?php p($post->discussion) ?>">
106 <input type="hidden" name=parent value="<?php p($post->parent) ?>">
107 <input type="hidden" name=userid value="<?php p($post->userid) ?>">
108 <input type="hidden" name=groupid value="<?php p($post->groupid) ?>">
109 <input type="hidden" name=edit value="<?php p($post->edit) ?>">
110 <input type="submit" value="<?php print_string("savechanges"); ?>">
111 </td>
113 </tr>
114 </table>
115 </form>