X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki.feedback%2Ffeedback.js;h=5b73e7c19e3e44cac7e7e4218a94fac55c0d445a;hb=7eb1d7d00ea488bd5e87b6d81a1d1fc14c461505;hp=d1fb98bf3ac7ff1a69db51c5e73743157f43c529;hpb=a8683aada771c07a7304ecd9fa3e874341376124;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/mediawiki.feedback/feedback.js b/resources/src/mediawiki.feedback/feedback.js index d1fb98bf3a..5b73e7c19e 100644 --- a/resources/src/mediawiki.feedback/feedback.js +++ b/resources/src/mediawiki.feedback/feedback.js @@ -328,7 +328,7 @@ } }, this ) .next( function () { - var plainMsg, parsedMsg, + var $link, settings = data.settings; data.contents = data.contents || {}; @@ -350,23 +350,12 @@ this.useragentMandatory = settings.useragentCheckbox.mandatory; this.useragentFieldLayout.toggle( settings.useragentCheckbox.show ); - // HACK: Setting a link in the messages doesn't work. There is already a report - // about this, and the bug report offers a somewhat hacky work around that - // includes setting a separate message to be parsed. - // We want to make sure the user can configure both the title of the page and - // a separate url, so this must be allowed to parse correctly. - // See https://phabricator.wikimedia.org/T49395#490610 - mw.messages.set( { - 'feedback-dialog-temporary-message': - '' + this.feedbackPageName + '' - } ); - plainMsg = mw.message( 'feedback-dialog-temporary-message' ).plain(); - mw.messages.set( { 'feedback-dialog-temporary-message-parsed': plainMsg } ); - parsedMsg = mw.message( 'feedback-dialog-temporary-message-parsed' ); + $link = $( '' ) + .attr( 'href', this.feedbackPageUrl ) + .attr( 'target', '_blank' ) + .text( this.feedbackPageName ); this.feedbackMessageLabel.setLabel( - // Double-parse - $( '' ) - .append( mw.message( 'feedback-dialog-intro', parsedMsg ).parse() ) + mw.message( 'feedback-dialog-intro', $link ).parseDom() ); this.validateFeedbackForm();