Spage has uploaded a new change for review.
https://gerrit.wikimedia.org/r/166711
Change subject: Only hide newtopic_form fields on a Flow board
......................................................................
Only hide newtopic_form fields on a Flow board
They were display:none on the standalone action=newtopic page, breaking
it for no-JS users.
Bug:72064
Change-Id: I4cd4570eb5a18d5a28f6190989d854fe23c150b2
---
M handlebars/compiled/flow_block_topic.handlebars.php
M handlebars/compiled/flow_block_topic_lock.handlebars.php
M handlebars/compiled/flow_block_topiclist.handlebars.php
M handlebars/compiled/flow_block_topiclist_newtopic.handlebars.php
M handlebars/flow_block_topiclist.handlebars
M handlebars/flow_newtopic_form.handlebars
6 files changed, 18 insertions(+), 18 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow
refs/changes/11/166711/1
diff --git a/handlebars/compiled/flow_block_topic.handlebars.php
b/handlebars/compiled/flow_block_topic.handlebars.php
index 1de070e..f18961b 100644
--- a/handlebars/compiled/flow_block_topic.handlebars.php
+++ b/handlebars/compiled/flow_block_topic.handlebars.php
@@ -129,7 +129,7 @@
<div class="flow-menu-js-drop"><a
href="javascript:void(0);"><span class="wikiglyph
wikiglyph-ellipsis"></span></a></div>
<ul class="mw-ui-button-container flow-list">
'.((LCRun3::ifvar($cx,
((is_array($in['actions']) && isset($in['actions']['edit'])) ?
$in['actions']['edit'] : null))) ? '
- <li>
+ <li class="flow-menu-edit-action">
<a class="mw-ui-button
mw-ui-quiet"
href="'.htmlentities(((is_array($in['actions']['edit']) &&
isset($in['actions']['edit']['url'])) ? $in['actions']['edit']['url'] : null),
ENT_QUOTES, 'UTF-8').'"
title="'.htmlentities(((is_array($in['actions']['edit']) &&
isset($in['actions']['edit']['title'])) ? $in['actions']['edit']['title'] :
null), ENT_QUOTES, 'UTF-8').'"
@@ -161,7 +161,7 @@
</li>
' : '').'
'.((LCRun3::ifvar($cx,
((is_array($in['actions']) && isset($in['actions']['summarize'])) ?
$in['actions']['summarize'] : null))) ? '
- <li>
+ <li class="flow-menu-edit-action">
<a class="mw-ui-button
mw-ui-progressive mw-ui-quiet"
data-flow-interactive-handler="apiRequest"
data-flow-api-handler="activateSummarizeTopic"
diff --git a/handlebars/compiled/flow_block_topic_lock.handlebars.php
b/handlebars/compiled/flow_block_topic_lock.handlebars.php
index 32e0498..5128694 100644
--- a/handlebars/compiled/flow_block_topic_lock.handlebars.php
+++ b/handlebars/compiled/flow_block_topic_lock.handlebars.php
@@ -38,11 +38,11 @@
<input type="hidden" name="wpEditToken"
value="'.htmlentities(((is_array($cx['scopes'][0]) &&
isset($cx['scopes'][0]['editToken'])) ? $cx['scopes'][0]['editToken'] : null),
ENT_QUOTES, 'UTF-8').'" />
<textarea name="flow_reason"
- class="mw-ui-input"
- type="text"
- required
- data-flow-preview-node="moderateReason"
-
data-flow-preview-template="flow_topic_titlebar"
+ class="mw-ui-input"
+ type="text"
+ required
+ data-flow-preview-node="moderateReason"
+
data-flow-preview-template="flow_topic_titlebar"
>'.((LCRun3::ifvar($cx,
((is_array($cx['scopes'][0]['submitted']) &&
isset($cx['scopes'][0]['submitted']['reason'])) ?
$cx['scopes'][0]['submitted']['reason'] : null))) ?
''.htmlentities(((is_array($cx['scopes'][0]['submitted']) &&
isset($cx['scopes'][0]['submitted']['reason'])) ?
$cx['scopes'][0]['submitted']['reason'] : null), ENT_QUOTES, 'UTF-8').'' :
'').'</textarea>
<div class="flow-form-actions flow-form-collapsible">
<button data-role="submit"
diff --git a/handlebars/compiled/flow_block_topiclist.handlebars.php
b/handlebars/compiled/flow_block_topiclist.handlebars.php
index b744e2c..1bcec61 100644
--- a/handlebars/compiled/flow_block_topiclist.handlebars.php
+++ b/handlebars/compiled/flow_block_topiclist.handlebars.php
@@ -83,8 +83,8 @@
<div class="flow-board">
- '.'
<div class="flow-newtopic-container">
+ '.'
<div class="flow-nojs">
<a class="mw-ui-input mw-ui-input-large
flow-ui-input-replacement-anchor"
href="'.htmlentities(((is_array($in['links'])
&& isset($in['links']['newtopic'])) ? $in['links']['newtopic'] : null),
ENT_QUOTES, 'UTF-8').'">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-newtopic-start-placeholder'),Array()), 'encq').'</a>
@@ -132,11 +132,11 @@
<textarea name="topiclist_content"
data-flow-preview-template="flow_topic"
class="mw-ui-input flow-form-collapsible
mw-ui-input-large"
- style="display:none;"
+ '.((LCRun3::ifvar($cx, ((is_array($in) &&
isset($in['isOnFlowBoard'])) ? $in['isOnFlowBoard'] : null))) ?
'style="display:none;"' : '').'
placeholder="'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-newtopic-content-placeholder',((is_array($cx['scopes'][0]) &&
isset($cx['scopes'][0]['title'])) ? $cx['scopes'][0]['title'] :
null)),Array()), 'encq').'" data-role="content" required></textarea>
<div class="flow-form-actions flow-form-collapsible"
- style="display:none;">
+ '.((LCRun3::ifvar($cx, ((is_array($in) &&
isset($in['isOnFlowBoard'])) ? $in['isOnFlowBoard'] : null))) ?
'style="display:none;"' : '').'>
<button data-role="submit"
data-flow-api-handler="newTopic"
data-flow-interactive-handler="apiRequest"
class="mw-ui-button mw-ui-constructive
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-newtopic-save'),Array()), 'encq').'</button>
@@ -159,7 +159,7 @@
</div>
</form>
' : '').'
-
+}
</div>
</div>
@@ -618,4 +618,4 @@
</div>
';
}
-?>
+?>
\ No newline at end of file
diff --git a/handlebars/compiled/flow_block_topiclist_newtopic.handlebars.php
b/handlebars/compiled/flow_block_topiclist_newtopic.handlebars.php
index 1333694..aaae9c1 100644
--- a/handlebars/compiled/flow_block_topiclist_newtopic.handlebars.php
+++ b/handlebars/compiled/flow_block_topiclist_newtopic.handlebars.php
@@ -65,11 +65,11 @@
<textarea name="topiclist_content"
data-flow-preview-template="flow_topic"
class="mw-ui-input flow-form-collapsible
mw-ui-input-large"
- style="display:none;"
+ '.((LCRun3::ifvar($cx, ((is_array($in) &&
isset($in['isOnFlowBoard'])) ? $in['isOnFlowBoard'] : null))) ?
'style="display:none;"' : '').'
placeholder="'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-newtopic-content-placeholder',((is_array($cx['scopes'][0]) &&
isset($cx['scopes'][0]['title'])) ? $cx['scopes'][0]['title'] :
null)),Array()), 'encq').'" data-role="content" required></textarea>
<div class="flow-form-actions flow-form-collapsible"
- style="display:none;">
+ '.((LCRun3::ifvar($cx, ((is_array($in) &&
isset($in['isOnFlowBoard'])) ? $in['isOnFlowBoard'] : null))) ?
'style="display:none;"' : '').'>
<button data-role="submit"
data-flow-api-handler="newTopic"
data-flow-interactive-handler="apiRequest"
class="mw-ui-button mw-ui-constructive
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-newtopic-save'),Array()), 'encq').'</button>
diff --git a/handlebars/flow_block_topiclist.handlebars
b/handlebars/flow_block_topiclist.handlebars
index 8876882..c9bf95d 100644
--- a/handlebars/flow_block_topiclist.handlebars
+++ b/handlebars/flow_block_topiclist.handlebars
@@ -1,15 +1,15 @@
{{> flow_board_navigation}}
<div class="flow-board">
- {{! new-topic form should only be displayed when run with JS, otherwise
link to designated page }}
<div class="flow-newtopic-container">
+ {{! No-JS gets a link to separate page with newtopic form }}
<div class="flow-nojs">
<a class="mw-ui-input mw-ui-input-large
flow-ui-input-replacement-anchor"
href="{{links.newtopic}}">{{l10n
"flow-newtopic-start-placeholder"}}</a>
</div>
<div class="flow-js">
- {{> flow_newtopic_form}}
+ {{> flow_newtopic_form isOnFlowBoard=true }}}
</div>
</div>
diff --git a/handlebars/flow_newtopic_form.handlebars
b/handlebars/flow_newtopic_form.handlebars
index bc75ecb..a798e70 100644
--- a/handlebars/flow_newtopic_form.handlebars
+++ b/handlebars/flow_newtopic_form.handlebars
@@ -14,11 +14,11 @@
<textarea name="topiclist_content"
data-flow-preview-template="flow_topic"
class="mw-ui-input flow-form-collapsible
mw-ui-input-large"
- style="display:none;"
+ {{#if isOnFlowBoard}}style="display:none;"{{/if}}
placeholder="{{l10n "flow-newtopic-content-placeholder"
@root.title}}" data-role="content" required></textarea>
<div class="flow-form-actions flow-form-collapsible"
- style="display:none;">
+ {{#if isOnFlowBoard}}style="display:none;"{{/if}}>
<button data-role="submit"
data-flow-api-handler="newTopic"
data-flow-interactive-handler="apiRequest"
class="mw-ui-button mw-ui-constructive
mw-ui-flush-right">{{l10n "flow-newtopic-save"}}</button>
--
To view, visit https://gerrit.wikimedia.org/r/166711
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4cd4570eb5a18d5a28f6190989d854fe23c150b2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Spage <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits