-23 Removals
+24 Additions

Created by:phpboost

1 # INCLUDE forum_top # 1 # INCLUDE forum_top #
2 2
3 <script> 3 <script>
4 <!-- 4 <!--
5 function check_form_post(){ 5 function check_form_post(){
6 if(document.getElementById('contents').value == "") { 6 if(document.getElementById('contents').value == "") {
7 alert("{L_REQUIRE_TEXT}"); 7 alert("{L_REQUIRE_TEXT}");
8 return false; 8 return false;
9 } 9 }
10 if(document.getElementById('title').value == "") { 10 if(document.getElementById('title').value == "") {
11 alert("{L_REQUIRE_TITLE}"); 11 alert("{L_REQUIRE_TITLE}");
12 return false; 12 return false;
13 } 13 }
14 if(!poll_hidded && document.getElementById('question').value == "") { 14 if(!poll_hidded && document.getElementById('question').value == "") {
15 alert("{L_REQUIRE_TITLE_POLL}"); 15 alert("{L_REQUIRE_TITLE_POLL}");
16 return false; 16 return false;
17 } 17 }
18 return true; 18 return true;
19 } 19 }
20 var poll_hidded = true; 20 var poll_hidded = true;
21 function hide_poll(divID) 21 function hide_poll(divID)
22 { 22 {
23 if( document.getElementById(divID) ) 23 if( document.getElementById(divID) )
24 { 24 {
25 document.getElementById(divID).style.display = 'block'; 25 document.getElementById(divID).style.display = 'block';
26 if( document.getElementById('hidepoll_link') ) 26 if( document.getElementById('hidepoll_link') )
27 { 27 {
28 document.getElementById('hidepoll_link').style.display = 'none'; 28 document.getElementById('hidepoll_link').style.display = 'none';
29 poll_hidded = false; 29 poll_hidded = false;
30 } 30 }
31 } 31 }
32 } 32 }
33 function add_poll_field(nbr_field) 33 function add_poll_field(nbr_field)
34 { 34 {
35 if ( typeof this.max_field_p == 'undefined' ) 35 if ( typeof this.max_field_p == 'undefined' )
36 this.max_field_p = (nbr_field == 0) ? 5 : nbr_field; 36 this.max_field_p = (nbr_field == 0) ? 5 : nbr_field;
37 else 37 else
38 this.max_field_p++; 38 this.max_field_p++;
39 39
40 if( this.max_field_p < 20 ) 40 if( this.max_field_p < 20 )
41 { 41 {
42 if( this.max_field_p == 19 ) 42 if( this.max_field_p == 19 )
43 { 43 {
44 if( document.getElementById('add_poll_field_link') ) 44 if( document.getElementById('add_poll_field_link') )
45 document.getElementById('add_poll_field_link').innerHTML = ''; 45 document.getElementById('add_poll_field_link').innerHTML = '';
46 } 46 }
47 document.getElementById('add_poll_field' + this.max_field_p).innerHTML += '<label><input type="text" name="a' + this.max_field_p + '" value="" /></label><br /><span id="add_poll_field' + (this.max_field_p + 1) + '"></span>'; 47 document.getElementById('add_poll_field' + this.max_field_p).innerHTML += '<label><input type="text" name="a' + this.max_field_p + '" value="" /></label><span class="field-description" id="add_poll_field' + (this.max_field_p + 1) + '"></span>';
48 } 48 }
49 } 49 }
50 function XMLHttpRequest_change_statut() 50 function XMLHttpRequest_change_statut()
51 { 51 {
52 var idtopic = {IDTOPIC}; 52 var idtopic = {IDTOPIC};
53 if( document.getElementById('forum_change_img') ) 53 if( document.getElementById('forum_change_img') )
54 document.getElementById('forum_change_img').innerHTML = '<i class="fa fa-spinner fa-spin"></i>'; 54 document.getElementById('forum_change_img').innerHTML = '<i class="fa fa-spinner fa-spin"></i>';
55 55
56 var xhr_object = xmlhttprequest_init('{PATH_TO_ROOT}/forum/xmlhttprequest.php?token={TOKEN}&msg_d=' + idtopic); 56 var xhr_object = xmlhttprequest_init('{PATH_TO_ROOT}/forum/xmlhttprequest.php?token={TOKEN}&msg_d=' + idtopic);
57 xhr_object.onreadystatechange = function() 57 xhr_object.onreadystatechange = function()
58 { 58 {
59 if( xhr_object.readyState == 4 && xhr_object.status == 200 ) 59 if( xhr_object.readyState == 4 && xhr_object.status == 200 )
60 { 60 {
61 if( document.getElementById('forum_change_img') ) 61 if( document.getElementById('forum_change_img') )
62 document.getElementById('forum_change_img').innerHTML = xhr_object.responseText == '1' ? '<i class="fa fa-msg-not-display"></i>' : '<i class="fa fa-msg-display"></i>'; 62 document.getElementById('forum_change_img').innerHTML = xhr_object.responseText == '1' ? '<i class="fa fa-msg-not-display"></i>' : '<i class="fa fa-msg-display"></i>';
63 if( document.getElementById('forum_change_msg') ) 63 if( document.getElementById('forum_change_msg') )
64 document.getElementById('forum_change_msg').innerHTML = xhr_object.responseText == '1' ? "{L_EXPLAIN_DISPLAY_MSG_BIS}" : "{L_EXPLAIN_DISPLAY_MSG}"; 64 document.getElementById('forum_change_msg').innerHTML = xhr_object.responseText == '1' ? "{L_EXPLAIN_DISPLAY_MSG_BIS}" : "{L_EXPLAIN_DISPLAY_MSG}";
65 } 65 }
66 } 66 }
67 xmlhttprequest_sender(xhr_object, null); 67 xmlhttprequest_sender(xhr_object, null);
68 } 68 }
69 --> 69 -->
70 </script> 70 </script>
71 <article itemscope="itemscope" itemtype="http://schema.org/Creativework" id="article-forum-post"> 71 <article itemscope="itemscope" itemtype="http://schema.org/Creativework" id="article-forum-post" class="forum-contents">
72 <header> 72 <header>
73 <h2> 73 <h2>
74 &bull; {U_FORUM_CAT} &raquo; {U_TITLE_T} <span><em>{DESC}</em></span> 74 <a href="{U_FORUM_CAT}">{FORUM_CAT}</a> <i class="fa fa-angle-double-right" aria-hidden="true"></i> <a href="{U_TITLE_T}">{L_NEW_SUBJECT}</a> <span class="small"><em>{DESC}</em></span>
75 </h2> 75 </h2>
76 </header> 76 </header>
77 77
78 <div class="content"> 78 <div class="content">
79 <form action="{U_ACTION}" method="post" onsubmit="return check_form_post();"> 79 <form action="{U_ACTION}" method="post" onsubmit="return check_form_post();">
80 # INCLUDE message_helper # 80 # INCLUDE message_helper #
81 81
82 <div class="fieldset-content"> 82 <div class="fieldset-content">
83 <p class="center">{L_REQUIRE}</p> 83 <p class="center">{L_REQUIRE}</p>
84 <fieldset> 84 <fieldset>
85 <legend>{L_ACTION}</legend> 85 <legend>{L_ACTION}</legend>
86 # IF C_FORUM_CUT_CAT # 86 # IF C_FORUM_CUT_CAT #
87 <div class="form-element"> 87 <div class="form-element">
88 <label for="to">* {L_CAT}</label> 88 <label for="to">* {L_CAT}</label>
89 <div class="form-field"><label> 89 <div class="form-field"><label>
90 <select id="to" name="to"> 90 <select id="to" name="to">
91 {CATEGORIES} 91 {CATEGORIES}
92 </select> 92 </select>
93 </label></div> 93 </label></div>
94 </div> 94 </div>
95 # ENDIF # 95 # ENDIF #
96 <div class="form-element"> 96 <div class="form-element">
97 <label for="title">* {L_TITLE}</label> 97 <label for="title">* {L_TITLE}</label>
98 <div class="form-field"><label><input type="text" class="field-large" maxlength="100" id="title" name="title" value="{TITLE}"></label></div> 98 <div class="form-field"><label><input type="text" class="field-large" maxlength="100" id="title" name="title" value="{TITLE}"></label></div>
99 </div> 99 </div>
100 <div class="form-element"> 100 <div class="form-element">
101 <label for="desc">{L_DESC}</label> 101 <label for="desc">{L_DESC}</label>
102 <div class="form-field"><label><input type="text" class="field-large" maxlength="75" id="desc" name="desc" value="{DESC}"></label></div> 102 <div class="form-field"><label><input type="text" class="field-large" maxlength="75" id="desc" name="desc" value="{DESC}"></label></div>
103 </div> 103 </div>
104 <div class="form-element-textarea"> 104 <div class="form-element-textarea">
105 <label for="contents">* {L_MESSAGE}</label> 105 <label for="contents">* {L_MESSAGE}</label>
106 {KERNEL_EDITOR} 106 {KERNEL_EDITOR}
107 <div class="form-field-textarea"> 107 <div class="form-field-textarea">
108 <textarea rows="25" cols="47" id="contents" name="contents">{CONTENTS}</textarea> 108 <textarea rows="25" cols="47" id="contents" name="contents">{CONTENTS}</textarea>
109 </div> 109 </div>
110 </div> 110 </div>
111 # IF C_FORUM_POST_TYPE # 111 # IF C_FORUM_POST_TYPE #
112 <div class="form-element"> 112 <div class="form-element">
113 <label for="type">{L_TYPE}</label> 113 <label for="type">{L_TYPE}</label>
114 <div class="form-field"> 114 <div class="form-field">
115 <label><input type="radio" name="type" id="type" value="0" {CHECKED_NORMAL}> {L_DEFAULT}</label> 115 <label><input type="radio" name="type" id="type" value="0" {CHECKED_NORMAL}> {L_DEFAULT}</label>
116 <label><input type="radio" name="type" value="1" {CHECKED_POSTIT}> {L_POST_IT}</label> 116 <label><input type="radio" name="type" value="1" {CHECKED_POSTIT}> {L_POST_IT}</label>
117 <label><input type="radio" name="type" value="2" {CHECKED_ANNONCE}> {L_ANOUNCE}</label> 117 <label><input type="radio" name="type" value="2" {CHECKED_ANNONCE}> {L_ANOUNCE}</label>
118 </div> 118 </div>
119 </div> 119 </div>
120 # ENDIF # 120 # ENDIF #
121 </fieldset> 121 </fieldset>
122 122
123 <fieldset> 123 <fieldset>
124 <legend>{L_POLL}</legend> 124 <legend>{L_POLL}</legend>
125 <p id="hidepoll_link" class="center"><a title="{L_OPEN_MENU_POLL}" href="" onclick="hide_poll('hidepoll');return false;">{L_OPEN_MENU_POLL}</a></p> 125 <p id="hidepoll_link" class="center"><a title="{L_OPEN_MENU_POLL}" href="" onclick="hide_poll('hidepoll');return false;">{L_OPEN_MENU_POLL}</a></p>
126 <div id="hidepoll"> 126 <div id="hidepoll">
127 <div class="form-element"> 127 <div class="form-element">
128 <label for="question">* {L_QUESTION}</label> 128 <label for="question">* {L_QUESTION}</label>
129 <div class="form-field"><label><input type="text" name="question" id="question" value="{POLL_QUESTION}"></label></div> 129 <div class="form-field"><label><input type="text" name="question" id="question" value="{POLL_QUESTION}"></label></div>
130 </div> 130 </div>
131 <div class="form-element"> 131 <div class="form-element">
132 <label for="poll_type">{L_POLL_TYPE}</label> 132 <label for="poll_type">{L_POLL_TYPE}</label>
133 <div class="form-field"> 133 <div class="form-field">
134 <label><input type="radio" name="poll_type" id="poll_type" value="0" {SELECTED_SIMPLE}> {L_SINGLE}</label> 134 <label><input type="radio" name="poll_type" id="poll_type" value="0" {SELECTED_SIMPLE}> {L_SINGLE}</label>
135 <label><input type="radio" name="poll_type" value="1" {SELECTED_MULTIPLE}> {L_MULTIPLE}</label> 135 <label><input type="radio" name="poll_type" value="1" {SELECTED_MULTIPLE}> {L_MULTIPLE}</label>
136 </div> 136 </div>
137 </div> 137 </div>
138 # IF C_DELETE_POLL # 138 # IF C_DELETE_POLL #
139 <div class="form-element"> 139 <div class="form-element">
140 <label for="del_poll">{L_DELETE_POLL}</label> 140 <label for="del_poll">{L_DELETE_POLL}</label>
141 <div class="form-field"><label><input type="checkbox" name="del_poll" id="del_poll" value="true"></label></div> 141 <div class="form-field"><label><input type="checkbox" name="del_poll" id="del_poll" value="true"></label></div>
142 </div> 142 </div>
143 # ENDIF # 143 # ENDIF #
144 <div class="form-element"> 144 <div class="form-element">
145 <label>{L_ANSWERS}</label> 145 <label>{L_ANSWERS}</label>
146 <div class="form-field"> 146 <div class="form-field">
147 # START answers_poll # 147 # START answers_poll #
148 <label><input type="text" name="a{answers_poll.ID}" value="{answers_poll.ANSWER}" /> <em>{answers_poll.NBR_VOTES} {answers_poll.L_VOTES}</em></label><br /> 148 <label><input type="text" name="a{answers_poll.ID}" value="{answers_poll.ANSWER}" /> <em>{answers_poll.NBR_VOTES} {answers_poll.L_VOTES}</em></label>
149 # END answers_poll # 149 # END answers_poll #
150 <span id="add_poll_field{NBR_POLL_FIELD}"></span> 150 <span id="add_poll_field{NBR_POLL_FIELD}"></span>
151 151
152 <p class="center" id="add_poll_field_link"> 152 <p class="center" id="add_poll_field_link">
153 # IF C_ADD_POLL_FIELD # 153 # IF C_ADD_POLL_FIELD #
154 <a title="${LangLoader::get_message('add', 'common')}" href="" onclick="add_poll_field({NBR_POLL_FIELD});return false;"><i class="fa fa-plus"></i></a> 154 <a aria-label="${LangLoader::get_message('add', 'common')}" href="" onclick="add_poll_field({NBR_POLL_FIELD});return false;"><i class="fa fa-plus" aria-hidden="true" title="${LangLoader::get_message('add', 'common')}"></i></a>
155 # ENDIF # 155 # ENDIF #
156 </p> 156 </p>
157 </div> 157 </div>
158 </div> 158 </div>
159 </div> 159 </div>
160 <script> 160 <script>
161 <!-- 161 <!--
162 if( {NO_DISPLAY_POLL} ) 162 if( {NO_DISPLAY_POLL} )
163 document.getElementById('hidepoll').style.display = 'none'; 163 document.getElementById('hidepoll').style.display = 'none';
164 else 164 else
165 document.getElementById('hidepoll_link').style.display = 'none'; 165 document.getElementById('hidepoll_link').style.display = 'none';
166 --> 166 -->
167 </script> 167 </script>
168 </fieldset> 168 </fieldset>
169 169
170 <fieldset class="fieldset-submit"> 170 <fieldset class="fieldset-submit">
171 <legend>{L_SUBMIT}</legend> 171 <legend>{L_SUBMIT}</legend>
172 <input type="hidden" name="idm" value="{IDM}"> 172 <input type="hidden" name="idm" value="{IDM}">
173 <input type="hidden" name="token" value="{TOKEN}"> 173 <input type="hidden" name="token" value="{TOKEN}">
174 <button type="submit" name="post_topic" value="true" class="submit">{L_SUBMIT}</button> 174 <button type="submit" name="post_topic" value="true" class="submit">{L_SUBMIT}</button>
175 <button onclick="XMLHttpRequest_preview();" type="button">{L_PREVIEW}</button> 175 <button onclick="XMLHttpRequest_preview();" type="button">{L_PREVIEW}</button>
176 <button type="reset" value="true">{L_RESET}</button> 176 <button type="reset" value="true">{L_RESET}</button>
177 177
178 # IF C_DISPLAY_MSG # 178 # IF C_DISPLAY_MSG #
179 <br /><br /><br /> 179 <p>
180 <span id="forum_change_statut"> 180 <span id="forum_change_statut">
181 <a href="" onclick="XMLHttpRequest_change_statut();return false;" id="forum_change_img">{ICON_DISPLAY_MSG}</a> <a href="" onclick="XMLHttpRequest_change_statut();return false;"><span id="forum_change_msg">{L_EXPLAIN_DISPLAY_MSG_DEFAULT}</span></a> 181 <a href="" onclick="XMLHttpRequest_change_statut();return false;" id="forum_change_img"># IF C_ICON_DISPLAY_MSG #<i class="{ICON_DISPLAY_MSG}" aria-hidden="true"></i># ENDIF #</a> <a href="" onclick="XMLHttpRequest_change_statut();return false;"><span id="forum_change_msg">{L_EXPLAIN_DISPLAY_MSG_DEFAULT}</span></a>
182 </span> 182 </span>
183 </p>
183 # ENDIF # 184 # ENDIF #
184 </fieldset> 185 </fieldset>
185 </div> 186 </div>
186 </form> 187 </form>
187 </div> 188 </div>
188 <footer> 189 <footer class="footer-forum">
189 &bull; {U_FORUM_CAT} &raquo; {U_TITLE_T} <span><em>{DESC}</em></span> 190 <a href="{U_FORUM_CAT}">{FORUM_CAT}</a> <i class="fa fa-angle-double-right" aria-hidden="true"></i> <a href="{U_TITLE_T}">{L_NEW_SUBJECT}</a> <span class="small"><em>{DESC}</em></span>
190 </footer> 191 </footer>
191 </article> 192 </article>
192 193
193 # INCLUDE forum_bottom # 194 # INCLUDE forum_bottom #
Editor
Original Text
Changed Text
Recommended videos