diff --git a/sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-report-topic.php b/sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-report-topic.php
a
|
b
|
|
105 | 105 | remove_action( 'set_object_terms', array( $this, 'detect_manual_modlook' ), 10 ); |
106 | 106 | wp_add_object_terms( $_POST['wporg-support-report-topic'], 'modlook', 'topic-tag' ); |
107 | 107 | |
108 | | $reason = $_POST['topic-report-reason']; |
109 | | |
110 | | if ( 'other-input' === $reason ) { |
111 | | $reason = $_POST['topic-report-reason-other']; |
112 | | } |
| 108 | $reason = sprintf( |
| 109 | '%s: %s', |
| 110 | $_POST['topic-report-reason'], |
| 111 | $_POST['topic-report-reason-details'] |
| 112 | ); |
113 | 113 | |
114 | 114 | $this->add_modlook_history( $_POST['wporg-support-report-topic'], $reason ); |
115 | 115 | |
… |
… |
|
172 | 172 | <input type="hidden" name="wporg-support-report-topic" value="<?php echo esc_attr( bbp_get_topic_id() ); ?>"> |
173 | 173 | |
174 | 174 | <label for="topic-report-reason"><?php _e( 'Report this topic for:', 'wporg-forums' ); ?></label> |
175 | | <select name="topic-report-reason" id="topic-report-reason" required="required" onchange="wporg_report_topic_change()"> |
| 175 | <select name="topic-report-reason" id="topic-report-reason" required="required"> |
176 | 176 | <option value=""><?php _ex( '— Choose one —', 'Report a topic reason', 'wporg-forums' ); ?></option> |
177 | 177 | <option><?php _ex( 'Guideline violation', 'Report a topic reason', 'wporg-forums' ); ?></option> |
178 | 178 | <option><?php _ex( 'Security related', 'Report a topic reason', 'wporg-forums' ); ?></option> |
… |
… |
|
180 | 180 | <option><?php _ex( 'NSFW (Not Safe For Work) link', 'Report a topic reason', 'wporg-forums' ); ?></option> |
181 | 181 | <option value="other-input"><?php _ex( 'Other', 'Report a topic reason', 'wporg-forums' ); ?></option> |
182 | 182 | </select> |
183 | | <aside id="report-topic-other" style="display: none;"> |
184 | | <label for="topic-report-reason-other"><?php _e( 'Your own reason:', 'wporg-forums' ); ?></label> |
185 | | <input type="text" name="topic-report-reason-other" id="topic-report-reason-other"> |
| 183 | <aside id="report-topic-other"> |
| 184 | <label for="topic-report-reason-details"><?php _e( 'Why are you reporting this topic:', 'wporg-forums' ); ?></label> |
| 185 | <input type="text" name="topic-report-reason-details" id="topic-report-reason-details" required="required"> |
186 | 186 | </aside> |
187 | 187 | <input type="submit" name="submit" value="<?php esc_attr_e( 'Report', 'wporg-forums' ); ?>"> |
188 | 188 | </form> |
189 | | |
190 | | <script type="text/javascript"> |
191 | | function wporg_report_topic_change() { |
192 | | if ( 'other-input' === document.getElementById('topic-report-reason').value ) { |
193 | | document.getElementById( 'report-topic-other' ).style.display = 'block'; |
194 | | } else { |
195 | | document.getElementById( 'report-topic-other' ).style.display = 'none'; |
196 | | } |
197 | | } |
198 | | </script> |
199 | 189 | <?php |
200 | 190 | $report_text = ob_get_clean(); |
201 | 191 | } |