Esanders has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/385431 )
Change subject: Use mw-editfont-* classes on noJS wikitext inputs ...................................................................... Use mw-editfont-* classes on noJS wikitext inputs We already use editfont classes on the JS wikitext widget. Change-Id: I2fb43f026c40d9e85bd2ea5a18cdf8297256183c --- M handlebars/compiled/flow_block_header_edit.handlebars.php M handlebars/compiled/flow_block_header_undo_edit.handlebars.php M handlebars/compiled/flow_block_topic.handlebars.php M handlebars/compiled/flow_block_topic_moderate_post.handlebars.php M handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php M handlebars/compiled/flow_block_topic_undo_edit.handlebars.php M handlebars/compiled/flow_block_topiclist.handlebars.php M handlebars/compiled/flow_block_topiclist_newtopic.handlebars.php M handlebars/compiled/flow_block_topicsummary_edit.handlebars.php M handlebars/compiled/flow_block_topicsummary_undo_edit.handlebars.php M handlebars/compiled/flow_post.handlebars.php M handlebars/flow_block_header_edit.handlebars M handlebars/flow_block_header_undo_edit.handlebars M handlebars/flow_block_topic_undo_edit.handlebars M handlebars/flow_block_topicsummary_edit.handlebars M handlebars/flow_block_topicsummary_undo_edit.handlebars M handlebars/flow_edit_post.partial.handlebars M handlebars/flow_newtopic_form.partial.handlebars M handlebars/flow_reply_form.partial.handlebars M includes/View.php M modules/styles/mediawiki.ui/forms.less 21 files changed, 41 insertions(+), 23 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/31/385431/1 diff --git a/handlebars/compiled/flow_block_header_edit.handlebars.php b/handlebars/compiled/flow_block_header_edit.handlebars.php index 0d4823a..b09ce5b 100644 --- a/handlebars/compiled/flow_block_header_edit.handlebars.php +++ b/handlebars/compiled/flow_block_header_edit.handlebars.php @@ -50,7 +50,7 @@ ' : '').' <div class="flow-editor"> <textarea name="header_content" - class="mw-ui-input" + class="mw-ui-input mw-editfont-'.htmlentities((string)((isset($cx['sp_vars']['root']['editFont']) && is_array($cx['sp_vars']['root'])) ? $cx['sp_vars']['root']['editFont'] : null), ENT_QUOTES, 'UTF-8').'" placeholder="'.LCRun3::ch($cx, 'l10n', array(array('flow-edit-header-placeholder'),array()), 'encq').'" data-role="content" >'.((LCRun3::ifvar($cx, ((isset($in['submitted']['content']) && is_array($in['submitted'])) ? $in['submitted']['content'] : null))) ? ''.htmlentities((string)((isset($in['submitted']['content']) && is_array($in['submitted'])) ? $in['submitted']['content'] : null), ENT_QUOTES, 'UTF-8').'' : ''.htmlentities((string)((isset($in['revision']['content']['content']) && is_array($in['revision']['content'])) ? $in['revision']['content']['content'] : null), ENT_QUOTES, 'UTF-8').'').'</textarea> diff --git a/handlebars/compiled/flow_block_header_undo_edit.handlebars.php b/handlebars/compiled/flow_block_header_undo_edit.handlebars.php index 256f122..0a1efc5 100644 --- a/handlebars/compiled/flow_block_header_undo_edit.handlebars.php +++ b/handlebars/compiled/flow_block_header_undo_edit.handlebars.php @@ -44,7 +44,7 @@ <input type="hidden" name="header_prev_revision" value="'.htmlentities((string)((isset($in['current']['revisionId']) && is_array($in['current'])) ? $in['current']['revisionId'] : null), ENT_QUOTES, 'UTF-8').'" /> <div class="flow-editor"> - <textarea name="header_content" class="mw-ui-input" data-role="content">'.((LCRun3::ifvar($cx, ((isset($in['submitted']['content']) && is_array($in['submitted'])) ? $in['submitted']['content'] : null))) ? ''.htmlentities((string)((isset($in['submitted']['content']) && is_array($in['submitted'])) ? $in['submitted']['content'] : null), ENT_QUOTES, 'UTF-8').'' : ''.((LCRun3::ifvar($cx, ((isset($in['undo']['possible']) && is_array($in['undo'])) ? $in['undo']['possible'] : null))) ? ''.htmlentities((string)((isset($in['undo']['content']) && is_array($in['undo'])) ? $in['undo']['content'] : null), ENT_QUOTES, 'UTF-8').'' : ''.htmlentities((string)((isset($in['current']['content']['content']) && is_array($in['current']['content'])) ? $in['current']['content']['content'] : null), ENT_QUOTES, 'UTF-8').'').'').'</textarea> + <textarea name="header_content" class="mw-ui-input mw-editfont-'.htmlentities((string)((isset($cx['sp_vars']['root']['rootBlock']['editFont']) && is_array($cx['sp_vars']['root']['rootBlock'])) ? $cx['sp_vars']['root']['rootBlock']['editFont'] : null), ENT_QUOTES, 'UTF-8').'" data-role="content">'.((LCRun3::ifvar($cx, ((isset($in['submitted']['content']) && is_array($in['submitted'])) ? $in['submitted']['content'] : null))) ? ''.htmlentities((string)((isset($in['submitted']['content']) && is_array($in['submitted'])) ? $in['submitted']['content'] : null), ENT_QUOTES, 'UTF-8').'' : ''.((LCRun3::ifvar($cx, ((isset($in['undo']['possible']) && is_array($in['undo'])) ? $in['undo']['possible'] : null))) ? ''.htmlentities((string)((isset($in['undo']['content']) && is_array($in['undo'])) ? $in['undo']['content'] : null), ENT_QUOTES, 'UTF-8').'' : ''.htmlentities((string)((isset($in['current']['content']['content']) && is_array($in['current']['content'])) ? $in['current']['content']['content'] : null), ENT_QUOTES, 'UTF-8').'').'').'</textarea> </div> <div class="flow-form-actions flow-form-collapsible"> diff --git a/handlebars/compiled/flow_block_topic.handlebars.php b/handlebars/compiled/flow_block_topic.handlebars.php index 006d35f..110679a 100644 --- a/handlebars/compiled/flow_block_topic.handlebars.php +++ b/handlebars/compiled/flow_block_topic.handlebars.php @@ -176,7 +176,7 @@ '.$sp.' name="topic_content" '.$sp.' required '.$sp.' data-flow-expandable="true" -'.$sp.' class="mw-ui-input flow-click-interactive" +'.$sp.' class="mw-ui-input flow-click-interactive mw-editfont-'.htmlentities((string)((isset($cx['sp_vars']['root']['rootBlock']['editFont']) && is_array($cx['sp_vars']['root']['rootBlock'])) ? $cx['sp_vars']['root']['rootBlock']['editFont'] : null), ENT_QUOTES, 'UTF-8').'" '.$sp.' type="text" '.$sp.' placeholder="'.LCRun3::ch($cx, 'l10n', array(array('flow-reply-topic-title-placeholder',((isset($in['properties']['topic-of-post-text-from-html']) && is_array($in['properties'])) ? $in['properties']['topic-of-post-text-from-html'] : null)),array()), 'encq').'" '.$sp.' data-role="content" diff --git a/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php b/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php index e11d472..3fb2a82 100644 --- a/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php +++ b/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php @@ -187,7 +187,7 @@ '.$sp.' <input type="hidden" name="topic_prev_revision" value="'.htmlentities((string)((isset($in['revisionId']) && is_array($in)) ? $in['revisionId'] : null), ENT_QUOTES, 'UTF-8').'" /> '.$sp.''.LCRun3::hbch($cx, 'ifAnonymous', array(array(),array()), $in, false, function($cx, $in)use($sp){return ''.LCRun3::p($cx, 'flow_anon_warning', array(array($in),array()), ' ').'';}).' '.$sp.' <div class="flow-editor"> -'.$sp.' <textarea name="topic_content" class="mw-ui-input flow-form-collapsible" data-role="content">'.((LCRun3::ifvar($cx, ((isset($cx['sp_vars']['root']['rootBlock']['submitted']['content']) && is_array($cx['sp_vars']['root']['rootBlock']['submitted'])) ? $cx['sp_vars']['root']['rootBlock']['submitted']['content'] : null))) ? ''.htmlentities((string)((isset($cx['sp_vars']['root']['rootBlock']['submitted']['content']) && is_array($cx['sp_vars']['root']['rootBlock']['submitted'])) ? $cx['sp_vars']['root']['rootBlock']['submitted']['content'] : null), ENT_QUOTES, 'UTF-8').'' : ''.htmlentities((string)((isset($in['content']['content']) && is_array($in['content'])) ? $in['content']['content'] : null), ENT_QUOTES, 'UTF-8').'').'</textarea> +'.$sp.' <textarea name="topic_content" class="mw-ui-input flow-form-collapsible mw-editfont-'.htmlentities((string)((isset($cx['sp_vars']['root']['rootBlock']['editFont']) && is_array($cx['sp_vars']['root']['rootBlock'])) ? $cx['sp_vars']['root']['rootBlock']['editFont'] : null), ENT_QUOTES, 'UTF-8').'" data-role="content">'.((LCRun3::ifvar($cx, ((isset($cx['sp_vars']['root']['rootBlock']['submitted']['content']) && is_array($cx['sp_vars']['root']['rootBlock']['submitted'])) ? $cx['sp_vars']['root']['rootBlock']['submitted']['content'] : null))) ? ''.htmlentities((string)((isset($cx['sp_vars']['root']['rootBlock']['submitted']['content']) && is_array($cx['sp_vars']['root']['rootBlock']['submitted'])) ? $cx['sp_vars']['root']['rootBlock']['submitted']['content'] : null), ENT_QUOTES, 'UTF-8').'' : ''.htmlentities((string)((isset($in['content']['content']) && is_array($in['content'])) ? $in['content']['content'] : null), ENT_QUOTES, 'UTF-8').'').'</textarea> '.$sp.' </div> '.$sp.' '.$sp.' <div class="flow-form-actions flow-form-collapsible"> @@ -212,7 +212,7 @@ '.$sp.' name="topic_content" '.$sp.' required '.$sp.' data-flow-expandable="true" -'.$sp.' class="mw-ui-input flow-click-interactive" +'.$sp.' class="mw-ui-input flow-click-interactive mw-editfont-'.htmlentities((string)((isset($cx['sp_vars']['root']['rootBlock']['editFont']) && is_array($cx['sp_vars']['root']['rootBlock'])) ? $cx['sp_vars']['root']['rootBlock']['editFont'] : null), ENT_QUOTES, 'UTF-8').'" '.$sp.' type="text" '.$sp.' placeholder="'.LCRun3::ch($cx, 'l10n', array(array('flow-reply-topic-title-placeholder',((isset($in['properties']['topic-of-post-text-from-html']) && is_array($in['properties'])) ? $in['properties']['topic-of-post-text-from-html'] : null)),array()), 'encq').'" '.$sp.' data-role="content" diff --git a/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php b/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php index f2d9bd6..5b9dc01 100644 --- a/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php +++ b/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php @@ -187,7 +187,7 @@ '.$sp.' <input type="hidden" name="topic_prev_revision" value="'.htmlentities((string)((isset($in['revisionId']) && is_array($in)) ? $in['revisionId'] : null), ENT_QUOTES, 'UTF-8').'" /> '.$sp.''.LCRun3::hbch($cx, 'ifAnonymous', array(array(),array()), $in, false, function($cx, $in)use($sp){return ''.LCRun3::p($cx, 'flow_anon_warning', array(array($in),array()), ' ').'';}).' '.$sp.' <div class="flow-editor"> -'.$sp.' <textarea name="topic_content" class="mw-ui-input flow-form-collapsible" data-role="content">'.((LCRun3::ifvar($cx, ((isset($cx['sp_vars']['root']['rootBlock']['submitted']['content']) && is_array($cx['sp_vars']['root']['rootBlock']['submitted'])) ? $cx['sp_vars']['root']['rootBlock']['submitted']['content'] : null))) ? ''.htmlentities((string)((isset($cx['sp_vars']['root']['rootBlock']['submitted']['content']) && is_array($cx['sp_vars']['root']['rootBlock']['submitted'])) ? $cx['sp_vars']['root']['rootBlock']['submitted']['content'] : null), ENT_QUOTES, 'UTF-8').'' : ''.htmlentities((string)((isset($in['content']['content']) && is_array($in['content'])) ? $in['content']['content'] : null), ENT_QUOTES, 'UTF-8').'').'</textarea> +'.$sp.' <textarea name="topic_content" class="mw-ui-input flow-form-collapsible mw-editfont-'.htmlentities((string)((isset($cx['sp_vars']['root']['rootBlock']['editFont']) && is_array($cx['sp_vars']['root']['rootBlock'])) ? $cx['sp_vars']['root']['rootBlock']['editFont'] : null), ENT_QUOTES, 'UTF-8').'" data-role="content">'.((LCRun3::ifvar($cx, ((isset($cx['sp_vars']['root']['rootBlock']['submitted']['content']) && is_array($cx['sp_vars']['root']['rootBlock']['submitted'])) ? $cx['sp_vars']['root']['rootBlock']['submitted']['content'] : null))) ? ''.htmlentities((string)((isset($cx['sp_vars']['root']['rootBlock']['submitted']['content']) && is_array($cx['sp_vars']['root']['rootBlock']['submitted'])) ? $cx['sp_vars']['root']['rootBlock']['submitted']['content'] : null), ENT_QUOTES, 'UTF-8').'' : ''.htmlentities((string)((isset($in['content']['content']) && is_array($in['content'])) ? $in['content']['content'] : null), ENT_QUOTES, 'UTF-8').'').'</textarea> '.$sp.' </div> '.$sp.' '.$sp.' <div class="flow-form-actions flow-form-collapsible"> @@ -212,7 +212,7 @@ '.$sp.' name="topic_content" '.$sp.' required '.$sp.' data-flow-expandable="true" -'.$sp.' class="mw-ui-input flow-click-interactive" +'.$sp.' class="mw-ui-input flow-click-interactive mw-editfont-'.htmlentities((string)((isset($cx['sp_vars']['root']['rootBlock']['editFont']) && is_array($cx['sp_vars']['root']['rootBlock'])) ? $cx['sp_vars']['root']['rootBlock']['editFont'] : null), ENT_QUOTES, 'UTF-8').'" '.$sp.' type="text" '.$sp.' placeholder="'.LCRun3::ch($cx, 'l10n', array(array('flow-reply-topic-title-placeholder',((isset($in['properties']['topic-of-post-text-from-html']) && is_array($in['properties'])) ? $in['properties']['topic-of-post-text-from-html'] : null)),array()), 'encq').'" '.$sp.' data-role="content" diff --git a/handlebars/compiled/flow_block_topic_undo_edit.handlebars.php b/handlebars/compiled/flow_block_topic_undo_edit.handlebars.php index 48ee825..eea3b67 100644 --- a/handlebars/compiled/flow_block_topic_undo_edit.handlebars.php +++ b/handlebars/compiled/flow_block_topic_undo_edit.handlebars.php @@ -45,7 +45,7 @@ <input type="hidden" name="topic_postId" value="'.htmlentities((string)((isset($in['current']['postId']) && is_array($in['current'])) ? $in['current']['postId'] : null), ENT_QUOTES, 'UTF-8').'" /> <div class="flow-editor"> - <textarea name="topic_content" class="mw-ui-input" data-role="content">'.((LCRun3::ifvar($cx, ((isset($in['submitted']['content']) && is_array($in['submitted'])) ? $in['submitted']['content'] : null))) ? ''.htmlentities((string)((isset($in['submitted']['content']) && is_array($in['submitted'])) ? $in['submitted']['content'] : null), ENT_QUOTES, 'UTF-8').'' : ''.((LCRun3::ifvar($cx, ((isset($in['undo']['possible']) && is_array($in['undo'])) ? $in['undo']['possible'] : null))) ? ''.htmlentities((string)((isset($in['undo']['content']) && is_array($in['undo'])) ? $in['undo']['content'] : null), ENT_QUOTES, 'UTF-8').'' : ''.htmlentities((string)((isset($in['current']['content']['content']) && is_array($in['current']['content'])) ? $in['current']['content']['content'] : null), ENT_QUOTES, 'UTF-8').'').'').'</textarea> + <textarea name="topic_content" class="mw-ui-input mw-editfont-'.htmlentities((string)((isset($cx['sp_vars']['root']['rootBlock']['editFont']) && is_array($cx['sp_vars']['root']['rootBlock'])) ? $cx['sp_vars']['root']['rootBlock']['editFont'] : null), ENT_QUOTES, 'UTF-8').'" data-role="content">'.((LCRun3::ifvar($cx, ((isset($in['submitted']['content']) && is_array($in['submitted'])) ? $in['submitted']['content'] : null))) ? ''.htmlentities((string)((isset($in['submitted']['content']) && is_array($in['submitted'])) ? $in['submitted']['content'] : null), ENT_QUOTES, 'UTF-8').'' : ''.((LCRun3::ifvar($cx, ((isset($in['undo']['possible']) && is_array($in['undo'])) ? $in['undo']['possible'] : null))) ? ''.htmlentities((string)((isset($in['undo']['content']) && is_array($in['undo'])) ? $in['undo']['content'] : null), ENT_QUOTES, 'UTF-8').'' : ''.htmlentities((string)((isset($in['current']['content']['content']) && is_array($in['current']['content'])) ? $in['current']['content']['content'] : null), ENT_QUOTES, 'UTF-8').'').'').'</textarea> </div> <div class="flow-form-actions flow-form-collapsible"> diff --git a/handlebars/compiled/flow_block_topiclist.handlebars.php b/handlebars/compiled/flow_block_topiclist.handlebars.php index 68227df..07a31fb 100644 --- a/handlebars/compiled/flow_block_topiclist.handlebars.php +++ b/handlebars/compiled/flow_block_topiclist.handlebars.php @@ -67,7 +67,7 @@ '.$sp.' /> '.$sp.''.((!LCRun3::ifvar($cx, ((isset($in['isOnFlowBoard']) && is_array($in)) ? $in['isOnFlowBoard'] : null))) ? ' <div class="flow-editor"> '.$sp.' <textarea name="topiclist_content" -'.$sp.' class="mw-ui-input flow-form-collapsible" +'.$sp.' class="mw-ui-input flow-form-collapsible mw-editfont-'.htmlentities((string)((isset($cx['sp_vars']['root']['editFont']) && is_array($cx['sp_vars']['root'])) ? $cx['sp_vars']['root']['editFont'] : null), ENT_QUOTES, 'UTF-8').'" '.$sp.' placeholder="'.LCRun3::ch($cx, 'l10n', array(array('flow-newtopic-content-placeholder',((isset($cx['sp_vars']['root']['title']) && is_array($cx['sp_vars']['root'])) ? $cx['sp_vars']['root']['title'] : null)),array()), 'encq').'" '.$sp.' data-role="content" '.$sp.' required @@ -206,7 +206,7 @@ '.$sp.' name="topic_content" '.$sp.' required '.$sp.' data-flow-expandable="true" -'.$sp.' class="mw-ui-input flow-click-interactive" +'.$sp.' class="mw-ui-input flow-click-interactive mw-editfont-'.htmlentities((string)((isset($cx['sp_vars']['root']['rootBlock']['editFont']) && is_array($cx['sp_vars']['root']['rootBlock'])) ? $cx['sp_vars']['root']['rootBlock']['editFont'] : null), ENT_QUOTES, 'UTF-8').'" '.$sp.' type="text" '.$sp.' placeholder="'.LCRun3::ch($cx, 'l10n', array(array('flow-reply-topic-title-placeholder',((isset($in['properties']['topic-of-post-text-from-html']) && is_array($in['properties'])) ? $in['properties']['topic-of-post-text-from-html'] : null)),array()), 'encq').'" '.$sp.' data-role="content" diff --git a/handlebars/compiled/flow_block_topiclist_newtopic.handlebars.php b/handlebars/compiled/flow_block_topiclist_newtopic.handlebars.php index 02d91a9..efc2527 100644 --- a/handlebars/compiled/flow_block_topiclist_newtopic.handlebars.php +++ b/handlebars/compiled/flow_block_topiclist_newtopic.handlebars.php @@ -56,7 +56,7 @@ '.$sp.' /> '.$sp.''.((!LCRun3::ifvar($cx, ((isset($in['isOnFlowBoard']) && is_array($in)) ? $in['isOnFlowBoard'] : null))) ? ' <div class="flow-editor"> '.$sp.' <textarea name="topiclist_content" -'.$sp.' class="mw-ui-input flow-form-collapsible" +'.$sp.' class="mw-ui-input flow-form-collapsible mw-editfont-'.htmlentities((string)((isset($cx['sp_vars']['root']['editFont']) && is_array($cx['sp_vars']['root'])) ? $cx['sp_vars']['root']['editFont'] : null), ENT_QUOTES, 'UTF-8').'" '.$sp.' placeholder="'.LCRun3::ch($cx, 'l10n', array(array('flow-newtopic-content-placeholder',((isset($cx['sp_vars']['root']['title']) && is_array($cx['sp_vars']['root'])) ? $cx['sp_vars']['root']['title'] : null)),array()), 'encq').'" '.$sp.' data-role="content" '.$sp.' required diff --git a/handlebars/compiled/flow_block_topicsummary_edit.handlebars.php b/handlebars/compiled/flow_block_topicsummary_edit.handlebars.php index 5130cf7..f8f55da 100644 --- a/handlebars/compiled/flow_block_topicsummary_edit.handlebars.php +++ b/handlebars/compiled/flow_block_topicsummary_edit.handlebars.php @@ -47,7 +47,7 @@ '.((LCRun3::ifvar($cx, ((isset($in['revision']['revisionId']) && is_array($in['revision'])) ? $in['revision']['revisionId'] : null))) ? ' <input type="hidden" name="'.htmlentities((string)((isset($in['type']) && is_array($in)) ? $in['type'] : null), ENT_QUOTES, 'UTF-8').'_prev_revision" value="'.htmlentities((string)((isset($in['revision']['revisionId']) && is_array($in['revision'])) ? $in['revision']['revisionId'] : null), ENT_QUOTES, 'UTF-8').'" /> ' : '').' <div class="flow-editor"> - <textarea class="mw-ui-input" + <textarea class="mw-ui-input mw-editfont-'.htmlentities((string)((isset($in['editFont']) && is_array($in)) ? $in['editFont'] : null), ENT_QUOTES, 'UTF-8').'" name="'.htmlentities((string)((isset($in['type']) && is_array($in)) ? $in['type'] : null), ENT_QUOTES, 'UTF-8').'_summary" type="text" placeholder="'.LCRun3::ch($cx, 'l10n', array(array('flow-edit-summary-placeholder'),array()), 'encq').'" diff --git a/handlebars/compiled/flow_block_topicsummary_undo_edit.handlebars.php b/handlebars/compiled/flow_block_topicsummary_undo_edit.handlebars.php index aa0c6eb..4957711 100644 --- a/handlebars/compiled/flow_block_topicsummary_undo_edit.handlebars.php +++ b/handlebars/compiled/flow_block_topicsummary_undo_edit.handlebars.php @@ -45,7 +45,7 @@ <div class="flow-editor"> <textarea name="topicsummary_summary" - class="mw-ui-input" + class="mw-ui-input mw-editfont-'.htmlentities((string)((isset($cx['sp_vars']['root']['rootBlock']['editFont']) && is_array($cx['sp_vars']['root']['rootBlock'])) ? $cx['sp_vars']['root']['rootBlock']['editFont'] : null), ENT_QUOTES, 'UTF-8').'" data-role="content" >'.((LCRun3::ifvar($cx, ((isset($in['submitted']['content']) && is_array($in['submitted'])) ? $in['submitted']['content'] : null))) ? ''.htmlentities((string)((isset($in['submitted']['content']) && is_array($in['submitted'])) ? $in['submitted']['content'] : null), ENT_QUOTES, 'UTF-8').'' : ''.((LCRun3::ifvar($cx, ((isset($in['undo']['possible']) && is_array($in['undo'])) ? $in['undo']['possible'] : null))) ? ''.htmlentities((string)((isset($in['undo']['content']) && is_array($in['undo'])) ? $in['undo']['content'] : null), ENT_QUOTES, 'UTF-8').'' : ''.htmlentities((string)((isset($in['current']['content']['content']) && is_array($in['current']['content'])) ? $in['current']['content']['content'] : null), ENT_QUOTES, 'UTF-8').'').'').'</textarea> </div> diff --git a/handlebars/compiled/flow_post.handlebars.php b/handlebars/compiled/flow_post.handlebars.php index 4b5db3e..8d2b354 100644 --- a/handlebars/compiled/flow_post.handlebars.php +++ b/handlebars/compiled/flow_post.handlebars.php @@ -164,7 +164,7 @@ '.$sp.' <input type="hidden" name="topic_prev_revision" value="'.htmlentities((string)((isset($in['revisionId']) && is_array($in)) ? $in['revisionId'] : null), ENT_QUOTES, 'UTF-8').'" /> '.$sp.''.LCRun3::hbch($cx, 'ifAnonymous', array(array(),array()), $in, false, function($cx, $in)use($sp){return ''.LCRun3::p($cx, 'flow_anon_warning', array(array($in),array()), ' ').'';}).' '.$sp.' <div class="flow-editor"> -'.$sp.' <textarea name="topic_content" class="mw-ui-input flow-form-collapsible" data-role="content">'.((LCRun3::ifvar($cx, ((isset($cx['sp_vars']['root']['rootBlock']['submitted']['content']) && is_array($cx['sp_vars']['root']['rootBlock']['submitted'])) ? $cx['sp_vars']['root']['rootBlock']['submitted']['content'] : null))) ? ''.htmlentities((string)((isset($cx['sp_vars']['root']['rootBlock']['submitted']['content']) && is_array($cx['sp_vars']['root']['rootBlock']['submitted'])) ? $cx['sp_vars']['root']['rootBlock']['submitted']['content'] : null), ENT_QUOTES, 'UTF-8').'' : ''.htmlentities((string)((isset($in['content']['content']) && is_array($in['content'])) ? $in['content']['content'] : null), ENT_QUOTES, 'UTF-8').'').'</textarea> +'.$sp.' <textarea name="topic_content" class="mw-ui-input flow-form-collapsible mw-editfont-'.htmlentities((string)((isset($cx['sp_vars']['root']['rootBlock']['editFont']) && is_array($cx['sp_vars']['root']['rootBlock'])) ? $cx['sp_vars']['root']['rootBlock']['editFont'] : null), ENT_QUOTES, 'UTF-8').'" data-role="content">'.((LCRun3::ifvar($cx, ((isset($cx['sp_vars']['root']['rootBlock']['submitted']['content']) && is_array($cx['sp_vars']['root']['rootBlock']['submitted'])) ? $cx['sp_vars']['root']['rootBlock']['submitted']['content'] : null))) ? ''.htmlentities((string)((isset($cx['sp_vars']['root']['rootBlock']['submitted']['content']) && is_array($cx['sp_vars']['root']['rootBlock']['submitted'])) ? $cx['sp_vars']['root']['rootBlock']['submitted']['content'] : null), ENT_QUOTES, 'UTF-8').'' : ''.htmlentities((string)((isset($in['content']['content']) && is_array($in['content'])) ? $in['content']['content'] : null), ENT_QUOTES, 'UTF-8').'').'</textarea> '.$sp.' </div> '.$sp.' '.$sp.' <div class="flow-form-actions flow-form-collapsible"> @@ -189,7 +189,7 @@ '.$sp.' name="topic_content" '.$sp.' required '.$sp.' data-flow-expandable="true" -'.$sp.' class="mw-ui-input flow-click-interactive" +'.$sp.' class="mw-ui-input flow-click-interactive mw-editfont-'.htmlentities((string)((isset($cx['sp_vars']['root']['rootBlock']['editFont']) && is_array($cx['sp_vars']['root']['rootBlock'])) ? $cx['sp_vars']['root']['rootBlock']['editFont'] : null), ENT_QUOTES, 'UTF-8').'" '.$sp.' type="text" '.$sp.' placeholder="'.LCRun3::ch($cx, 'l10n', array(array('flow-reply-topic-title-placeholder',((isset($in['properties']['topic-of-post-text-from-html']) && is_array($in['properties'])) ? $in['properties']['topic-of-post-text-from-html'] : null)),array()), 'encq').'" '.$sp.' data-role="content" diff --git a/handlebars/flow_block_header_edit.handlebars b/handlebars/flow_block_header_edit.handlebars index ac11e7b..2c47660 100644 --- a/handlebars/flow_block_header_edit.handlebars +++ b/handlebars/flow_block_header_edit.handlebars @@ -10,7 +10,7 @@ <div class="flow-editor"> <textarea name="header_content" - class="mw-ui-input" + class="mw-ui-input mw-editfont-{{@root.editFont}}" placeholder="{{l10n "flow-edit-header-placeholder"}}" data-role="content" > diff --git a/handlebars/flow_block_header_undo_edit.handlebars b/handlebars/flow_block_header_undo_edit.handlebars index 84fb620..94bb1fa 100644 --- a/handlebars/flow_block_header_undo_edit.handlebars +++ b/handlebars/flow_block_header_undo_edit.handlebars @@ -16,7 +16,7 @@ <input type="hidden" name="header_prev_revision" value="{{current.revisionId}}" /> <div class="flow-editor"> - <textarea name="header_content" class="mw-ui-input" data-role="content"> + <textarea name="header_content" class="mw-ui-input mw-editfont-{{@root.rootBlock.editFont}}" data-role="content"> {{~#if submitted.content~}} {{~submitted.content~}} {{~else~}} diff --git a/handlebars/flow_block_topic_undo_edit.handlebars b/handlebars/flow_block_topic_undo_edit.handlebars index 91cc9bf..048f8f7 100644 --- a/handlebars/flow_block_topic_undo_edit.handlebars +++ b/handlebars/flow_block_topic_undo_edit.handlebars @@ -17,7 +17,7 @@ <input type="hidden" name="topic_postId" value="{{current.postId}}" /> <div class="flow-editor"> - <textarea name="topic_content" class="mw-ui-input" data-role="content"> + <textarea name="topic_content" class="mw-ui-input mw-editfont-{{@root.rootBlock.editFont}}" data-role="content"> {{~#if submitted.content~}} {{~submitted.content~}} {{~else~}} diff --git a/handlebars/flow_block_topicsummary_edit.handlebars b/handlebars/flow_block_topicsummary_edit.handlebars index 66d3aba..fc6cbf4 100644 --- a/handlebars/flow_block_topicsummary_edit.handlebars +++ b/handlebars/flow_block_topicsummary_edit.handlebars @@ -9,7 +9,7 @@ {{/if}} <div class="flow-editor"> - <textarea class="mw-ui-input" + <textarea class="mw-ui-input mw-editfont-{{editFont}}" name="{{type}}_summary" type="text" placeholder="{{l10n "flow-edit-summary-placeholder"}}" diff --git a/handlebars/flow_block_topicsummary_undo_edit.handlebars b/handlebars/flow_block_topicsummary_undo_edit.handlebars index 79ffad9..d7e74d4 100644 --- a/handlebars/flow_block_topicsummary_undo_edit.handlebars +++ b/handlebars/flow_block_topicsummary_undo_edit.handlebars @@ -17,7 +17,7 @@ <div class="flow-editor"> <textarea name="topicsummary_summary" - class="mw-ui-input" + class="mw-ui-input mw-editfont-{{@root.rootBlock.editFont}}" data-role="content" > {{~#if submitted.content~}} diff --git a/handlebars/flow_edit_post.partial.handlebars b/handlebars/flow_edit_post.partial.handlebars index bb6d42a..6f766d0 100644 --- a/handlebars/flow_edit_post.partial.handlebars +++ b/handlebars/flow_edit_post.partial.handlebars @@ -10,7 +10,7 @@ {{/ifAnonymous}} <div class="flow-editor"> - <textarea name="topic_content" class="mw-ui-input flow-form-collapsible" data-role="content"> + <textarea name="topic_content" class="mw-ui-input flow-form-collapsible mw-editfont-{{@root.rootBlock.editFont}}" data-role="content"> {{~#if @root.rootBlock.submitted.content~}} {{~@root.rootBlock.submitted.content~}} {{~else~}} diff --git a/handlebars/flow_newtopic_form.partial.handlebars b/handlebars/flow_newtopic_form.partial.handlebars index 9eb2f03..89b73f1 100644 --- a/handlebars/flow_newtopic_form.partial.handlebars +++ b/handlebars/flow_newtopic_form.partial.handlebars @@ -18,7 +18,7 @@ {{#unless isOnFlowBoard}} <div class="flow-editor"> <textarea name="topiclist_content" - class="mw-ui-input flow-form-collapsible" + class="mw-ui-input flow-form-collapsible mw-editfont-{{@root.editFont}}" placeholder="{{l10n "flow-newtopic-content-placeholder" @root.title}}" data-role="content" required diff --git a/handlebars/flow_reply_form.partial.handlebars b/handlebars/flow_reply_form.partial.handlebars index a66ec3a..3793778 100644 --- a/handlebars/flow_reply_form.partial.handlebars +++ b/handlebars/flow_reply_form.partial.handlebars @@ -18,7 +18,7 @@ name="topic_content" required data-flow-expandable="true" - class="mw-ui-input flow-click-interactive" + class="mw-ui-input flow-click-interactive mw-editfont-{{@root.rootBlock.editFont}}" type="text" placeholder="{{l10n "flow-reply-topic-title-placeholder" properties.topic-of-post-text-from-html}}" data-role="content" diff --git a/includes/View.php b/includes/View.php index 1089867..b0e1fcd 100644 --- a/includes/View.php +++ b/includes/View.php @@ -181,6 +181,7 @@ ]; $editToken = $user->getEditToken(); + $editFont = $user->getOption( 'editfont' ); $wasPosted = $this->getRequest()->wasPosted(); $topicListBlock = null; foreach ( $blocks as $block ) { @@ -190,6 +191,7 @@ 'title' => $apiResponse['title'], 'block-action-template' => $block->getTemplate( $action ), 'editToken' => $editToken, + 'editFont' => $editFont, ]; if ( $block->getName() == 'topiclist' ) { $topicListBlock = $block; diff --git a/modules/styles/mediawiki.ui/forms.less b/modules/styles/mediawiki.ui/forms.less index a8623db..b4b9f0a 100644 --- a/modules/styles/mediawiki.ui/forms.less +++ b/modules/styles/mediawiki.ui/forms.less @@ -61,6 +61,22 @@ opacity: 0.66; } +/* Increase specificity for editfonts on inputs */ + +.mw-ui-input { + &.mw-editfont-monospace { + font-family: monospace, monospace; + } + + &.mw-editfont-sans-serif { + font-family: sans-serif; + } + + &.mw-editfont-serif { + font-family: serif; + } +} + /* == MediaWiki UI Text Field Validation == -- To view, visit https://gerrit.wikimedia.org/r/385431 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2fb43f026c40d9e85bd2ea5a18cdf8297256183c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Esanders <esand...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits