Index: trunk/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.js |
— | — | @@ -592,13 +592,13 @@ |
593 | 593 | .find( '.articleFeedback-helpimprove-note' ) |
594 | 594 | // Can't use .text() with mw.message(, /* $1 */ link).toString(), |
595 | 595 | // because 'link' should not be re-escaped (which would happen if done by mw.message) |
596 | | - .html( function(){ |
| 596 | + .html( function() { |
597 | 597 | var link = mw.html.element( |
598 | 598 | 'a', { |
599 | | - href: mw.util.wikiGetlink( mw.msg('articlefeedback-form-panel-helpimprove-privacylink') ) |
600 | | - }, mw.msg('articlefeedback-form-panel-helpimprove-privacy') |
| 599 | + href: context.options.privacyURL |
| 600 | + }, mw.msg( 'articlefeedback-form-panel-helpimprove-privacy' ) |
601 | 601 | ); |
602 | | - return mw.html.escape( mw.msg( 'articlefeedback-form-panel-helpimprove-note') ) |
| 602 | + return mw.html.escape( mw.msg( 'articlefeedback-form-panel-helpimprove-note' ) ) |
603 | 603 | .replace( /\$1/, link ); |
604 | 604 | }) |
605 | 605 | .end() |
Index: trunk/extensions/ArticleFeedback/modules/ext.articleFeedback/ext.articleFeedback.css |
— | — | @@ -10,3 +10,7 @@ |
11 | 11 | font-weight: normal; /* Override bold */ |
12 | 12 | font-style: italic; |
13 | 13 | } |
| 14 | + |
| 15 | +.articleFeedback-survey-disclaimer a { |
| 16 | + color: #0645AD; /* Override blackish color set by JUI */ |
| 17 | +} |
Index: trunk/extensions/ArticleFeedback/modules/ext.articleFeedback/ext.articleFeedback.js |
— | — | @@ -116,7 +116,21 @@ |
117 | 117 | $form.find( '#prefswitch-survey-origin' ).text( mw.config.get( 'wgTitle' ) ); |
118 | 118 | |
119 | 119 | // Insert disclaimer message |
120 | | - $button.before( $( '<div>' ).addClass( 'articleFeedback-survey-disclaimer' ).text( mw.msg( 'articlefeedback-survey-disclaimer' ) ) ); |
| 120 | + $button.before( |
| 121 | + $( '<div>' ) |
| 122 | + .addClass( 'articleFeedback-survey-disclaimer' ) |
| 123 | + // Can't use .text() with mw.message(, /* $1 */ link).toString(), |
| 124 | + // because 'link' should not be re-escaped (which would happen if done by mw.message) |
| 125 | + .html( function() { |
| 126 | + var link = mw.html.element( |
| 127 | + 'a', { |
| 128 | + href: mw.config.get( 'wgArticleFeedbackPrivacyURL' ) |
| 129 | + }, mw.msg( 'articlefeedback-survey-disclaimerlink' ) |
| 130 | + ); |
| 131 | + return mw.html.escape( mw.msg( 'articlefeedback-survey-disclaimer' ) ) |
| 132 | + .replace( /\$1/, link ); |
| 133 | + }) |
| 134 | + ); |
121 | 135 | |
122 | 136 | // Take dialog out of loading state |
123 | 137 | $dialog.removeClass( 'loading' ); |
— | — | @@ -298,7 +312,8 @@ |
299 | 313 | 'accept': 'articlefeedback-pitch-edit-accept', |
300 | 314 | 'reject': 'articlefeedback-pitch-reject' |
301 | 315 | } |
302 | | - } |
| 316 | + }, |
| 317 | + 'privacyURL': mw.config.get( 'wgArticleFeedbackPrivacyURL' ) |
303 | 318 | }; |
304 | 319 | |
305 | 320 | /* Load at the bottom of the article */ |
Index: trunk/extensions/ArticleFeedback/ArticleFeedback.i18n.php |
— | — | @@ -26,7 +26,8 @@ |
27 | 27 | 'articlefeedback-survey-submit' => 'Submit', |
28 | 28 | 'articlefeedback-survey-title' => 'Please answer a few questions', |
29 | 29 | 'articlefeedback-survey-thanks' => 'Thanks for filling out the survey.', |
30 | | - 'articlefeedback-survey-disclaimer' => 'By submitting, you agree to transparency under these [http://wikimediafoundation.org/wiki/Feedback_privacy_statement terms]', |
| 30 | + 'articlefeedback-survey-disclaimer' => 'By submitting, you agree to transparency under these $1.', |
| 31 | + 'articlefeedback-survey-disclaimerlink' => 'terms', |
31 | 32 | /* ext.articleFeedback and jquery.articleFeedback */ |
32 | 33 | 'articlefeedback-error' => 'An error has occured. Please try again later.', |
33 | 34 | 'articlefeedback-form-switch-label' => 'Rate this page', |
— | — | @@ -43,7 +44,6 @@ |
44 | 45 | 'articlefeedback-form-panel-helpimprove-note' => 'We will send you a confirmation e-mail. We will not share your e-mail address with outside parties as per our $1.', |
45 | 46 | 'articlefeedback-form-panel-helpimprove-email-placeholder' => 'email@example.org', // Optional |
46 | 47 | 'articlefeedback-form-panel-helpimprove-privacy' => 'feedback privacy statement', |
47 | | - 'articlefeedback-form-panel-helpimprove-privacylink' => 'http://wikimediafoundation.org/wiki/Feedback_privacy_statement', |
48 | 48 | 'articlefeedback-form-panel-submit' => 'Submit ratings', |
49 | 49 | 'articlefeedback-form-panel-pending' => 'Your ratings have not been submitted yet', |
50 | 50 | 'articlefeedback-form-panel-success' => 'Saved successfully', |
— | — | @@ -171,11 +171,12 @@ |
172 | 172 | {{Identical|Submit}}', |
173 | 173 | 'articlefeedback-survey-title' => 'This text appears in the title bar of the survey dialog.', |
174 | 174 | 'articlefeedback-survey-thanks' => 'This text appears when the user has successfully submitted the survey.', |
175 | | - 'articlefeedback-survey-disclaimer' => 'This text appears on the survey form below the comment field and above the submit button.', |
| 175 | + 'articlefeedback-survey-disclaimer' => 'This text appears on the survey form below the comment field and above the submit button. $1 is a link pointing to the privacy policy. The link text is in the articlefeedback-survey-disclaimerlink message.', |
176 | 176 | 'articlefeedback-form-panel-explanation' => '{{Identical|What is this}}', |
177 | 177 | 'articlefeedback-form-panel-explanation-link' => 'Do not translate "Project:". Also translate the "ArticleFeedback" special page name at [[Special:AdvancedTranslate]].', |
178 | 178 | 'articlefeedback-form-panel-helpimprove' => 'This message should use {{SITENAME}}.', |
179 | 179 | 'articlefeedback-form-panel-helpimprove-email-placeholder' => '{{Optional}}', |
| 180 | + 'articlefeedback-form-panel-helpimprove-note' => '$1 is a link pointing to the privacy policy. The link text is in the articlefeedback-form-panel-helpimprove-privacy message.', |
180 | 181 | 'articlefeedback-form-panel-helpimprove-privacy' => '{{Identical|Privacy}}', |
181 | 182 | 'articlefeedback-form-panel-helpimprove-privacylink' => 'Do not translate "Project:" |
182 | 183 | {{Identical|Privacypage}}', |
Index: trunk/extensions/ArticleFeedback/ArticleFeedback.php |
— | — | @@ -88,6 +88,11 @@ |
89 | 89 | */ |
90 | 90 | $wgArticleFeedbackDashboardTalkPage = "http://www.mediawiki.org/wiki/Talk:Article_feedback"; |
91 | 91 | |
| 92 | +/** |
| 93 | + * The full URL for the privacy policy links |
| 94 | + */ |
| 95 | +$wgArticleFeedbackPrivacyURL = 'http://wikimediafoundation.org/wiki/Feedback_privacy_statement'; |
| 96 | + |
92 | 97 | // Would ordinarily call this articlefeedback but survey names are 16 chars max |
93 | 98 | $wgPrefSwitchSurveys['articlerating'] = array( |
94 | 99 | 'updatable' => false, |
Index: trunk/extensions/ArticleFeedback/ArticleFeedback.hooks.php |
— | — | @@ -35,7 +35,8 @@ |
36 | 36 | 'articlefeedback-survey-title', |
37 | 37 | 'articlefeedback-survey-message-success', |
38 | 38 | 'articlefeedback-survey-message-error', |
39 | | - 'articlefeedback-survey-disclaimer' |
| 39 | + 'articlefeedback-survey-disclaimer', |
| 40 | + 'articlefeedback-survey-disclaimerlink' |
40 | 41 | ), |
41 | 42 | 'dependencies' => array( |
42 | 43 | 'jquery.ui.dialog', |
— | — | @@ -72,7 +73,6 @@ |
73 | 74 | 'articlefeedback-form-panel-helpimprove-note', |
74 | 75 | 'articlefeedback-form-panel-helpimprove-email-placeholder', |
75 | 76 | 'articlefeedback-form-panel-helpimprove-privacy', |
76 | | - 'articlefeedback-form-panel-helpimprove-privacylink', |
77 | 77 | 'articlefeedback-form-panel-submit', |
78 | 78 | 'articlefeedback-form-panel-success', |
79 | 79 | 'articlefeedback-form-panel-pending', |
— | — | @@ -279,7 +279,8 @@ |
280 | 280 | $wgArticleFeedbackTracking, |
281 | 281 | $wgArticleFeedbackOptions, |
282 | 282 | $wgArticleFeedbackNamespaces, |
283 | | - $wgArticleFeedbackRatingTypes; |
| 283 | + $wgArticleFeedbackRatingTypes, |
| 284 | + $wgArticleFeedbackPrivacyURL; |
284 | 285 | $vars['wgArticleFeedbackSMaxage'] = $wgArticleFeedbackSMaxage; |
285 | 286 | $vars['wgArticleFeedbackCategories'] = $wgArticleFeedbackCategories; |
286 | 287 | $vars['wgArticleFeedbackBlacklistCategories'] = $wgArticleFeedbackBlacklistCategories; |
— | — | @@ -289,6 +290,7 @@ |
290 | 291 | $vars['wgArticleFeedbackNamespaces'] = $wgArticleFeedbackNamespaces; |
291 | 292 | $vars['wgArticleFeedbackWhatsThisPage'] = wfMsgForContent( 'articlefeedback-form-panel-explanation-link' ); |
292 | 293 | $vars['wgArticleFeedbackRatingTypesFlipped'] = array_flip( $wgArticleFeedbackRatingTypes ); |
| 294 | + $vars['wgArticleFeedbackPrivacyURL'] = $wgArticleFeedbackPrivacyURL; |
293 | 295 | return true; |
294 | 296 | } |
295 | 297 | |