Mercurial > hg > vamp-website
comparison forum/Themes/Vamp/MoveTopic.template.php @ 76:e3e11437ecea website
Add forum code
author | Chris Cannam |
---|---|
date | Sun, 07 Jul 2013 11:25:48 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
75:72f59aa7e503 | 76:e3e11437ecea |
---|---|
1 <?php | |
2 /** | |
3 * Simple Machines Forum (SMF) | |
4 * | |
5 * @package SMF | |
6 * @author Simple Machines | |
7 * @copyright 2011 Simple Machines | |
8 * @license http://www.simplemachines.org/about/smf/license.php BSD | |
9 * | |
10 * @version 2.0 | |
11 */ | |
12 | |
13 // Show an interface for selecting which board to move a post to. | |
14 function template_main() | |
15 { | |
16 global $context, $settings, $options, $txt, $scripturl; | |
17 | |
18 echo ' | |
19 <div id="move_topic" class="lower_padding"> | |
20 <form action="', $scripturl, '?action=movetopic2;topic=', $context['current_topic'], '.0" method="post" accept-charset="', $context['character_set'], '" onsubmit="submitonce(this);"> | |
21 <div class="cat_bar"> | |
22 <h3 class="catbg">', $txt['move_topic'], '</h3> | |
23 </div> | |
24 <div class="windowbg centertext"> | |
25 <span class="topslice"><span></span></span> | |
26 <div class="content"> | |
27 <div class="move_topic"> | |
28 <dl class="settings"> | |
29 <dt> | |
30 <strong>', $txt['move_to'], ':</strong> | |
31 </dt> | |
32 <dd> | |
33 <select name="toboard">'; | |
34 | |
35 foreach ($context['categories'] as $category) | |
36 { | |
37 echo ' | |
38 <optgroup label="', $category['name'], '">'; | |
39 | |
40 foreach ($category['boards'] as $board) | |
41 echo ' | |
42 <option value="', $board['id'], '"', $board['selected'] ? ' selected="selected"' : '', $board['id'] == $context['current_board'] ? ' disabled="disabled"' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level']-1) . '=> ' : '', $board['name'], '</option>'; | |
43 echo ' | |
44 </optgroup>'; | |
45 } | |
46 | |
47 echo ' | |
48 </select> | |
49 </dd>'; | |
50 | |
51 // Disable the reason textarea when the postRedirect checkbox is unchecked... | |
52 echo ' | |
53 </dl> | |
54 <label for="reset_subject"><input type="checkbox" name="reset_subject" id="reset_subject" onclick="document.getElementById(\'subjectArea\').style.display = this.checked ? \'block\' : \'none\';" class="input_check" /> ', $txt['moveTopic2'], '.</label><br /> | |
55 <fieldset id="subjectArea" style="display: none;"> | |
56 <dl class="settings"> | |
57 <dt><strong>', $txt['moveTopic3'], ':</strong></dt> | |
58 <dd><input type="text" name="custom_subject" size="30" value="', $context['subject'], '" class="input_text" /></dd> | |
59 </dl> | |
60 <label for="enforce_subject"><input type="checkbox" name="enforce_subject" id="enforce_subject" class="input_check" /> ', $txt['moveTopic4'], '.</label> | |
61 </fieldset> | |
62 <label for="postRedirect"><input type="checkbox" name="postRedirect" id="postRedirect" ', $context['is_approved'] ? 'checked="checked"' : '', ' onclick="', $context['is_approved'] ? '' : 'if (this.checked && !confirm(\'' . $txt['move_topic_unapproved_js'] . '\')) return false; ', 'document.getElementById(\'reasonArea\').style.display = this.checked ? \'block\' : \'none\';" class="input_check" /> ', $txt['moveTopic1'], '.</label> | |
63 <fieldset id="reasonArea" style="margin-top: 1ex;', $context['is_approved'] ? '' : 'display: none;', '"> | |
64 <dl class="settings"> | |
65 <dt> | |
66 ', $txt['moved_why'], ' | |
67 </dt> | |
68 <dd> | |
69 <textarea name="reason" rows="3" cols="40">', $txt['movetopic_default'], '</textarea> | |
70 </dd> | |
71 </dl> | |
72 </fieldset> | |
73 <div class="righttext"> | |
74 <input type="submit" value="', $txt['move_topic'], '" onclick="return submitThisOnce(this);" accesskey="s" class="button_submit" /> | |
75 </div> | |
76 </div> | |
77 </div> | |
78 <span class="botslice"><span></span></span> | |
79 </div>'; | |
80 | |
81 if ($context['back_to_topic']) | |
82 echo ' | |
83 <input type="hidden" name="goback" value="1" />'; | |
84 | |
85 echo ' | |
86 <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" /> | |
87 <input type="hidden" name="seqnum" value="', $context['form_sequence_number'], '" /> | |
88 </form> | |
89 </div>'; | |
90 } | |
91 | |
92 ?> |