jenkins-bot has submitted this change and it was merged.
Change subject: Fixes cancel on reply form, and also standardizes cancel button
markup
......................................................................
Fixes cancel on reply form, and also standardizes cancel button markup
Cancel previously caused the form to submit, instead of disappear, sending the
user to the topic page itself
Change-Id: I12c5d1eb651254151cf237f633c64fc25f97c589
---
M handlebars/compiled/flow_block_header_edit.handlebars.php
M handlebars/compiled/flow_block_topic.handlebars.php
M handlebars/compiled/flow_block_topic_close.handlebars.php
M handlebars/compiled/flow_block_topic_edit_post.handlebars.php
M handlebars/compiled/flow_block_topic_edit_title.handlebars.php
M handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
M handlebars/compiled/flow_block_topic_reply.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_form_buttons.handlebars.php
M handlebars/flow_edit_topic_title.handlebars
M handlebars/flow_form_buttons.handlebars
M handlebars/flow_moderate_post.handlebars
M handlebars/flow_reply_form.handlebars
M modules/new/components/flow-board.js
16 files changed, 74 insertions(+), 52 deletions(-)
Approvals:
Matthias Mullie: Looks good to me, approved
jenkins-bot: Verified
diff --git a/handlebars/compiled/flow_block_header_edit.handlebars.php
b/handlebars/compiled/flow_block_header_edit.handlebars.php
index 2a4e110..5b186c2 100644
--- a/handlebars/compiled/flow_block_header_edit.handlebars.php
+++ b/handlebars/compiled/flow_block_header_edit.handlebars.php
@@ -54,10 +54,11 @@
class="mw-ui-button mw-ui-progressive mw-ui-quiet
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-preview'),Array()), 'encq').'</button>
'.LCRun3::hbch($cx, 'progressiveEnhancement',
Array(Array(),Array('insertionType'=>'insertion','sectionId'=>'flow-cancel-button')),
$in, function($cx, $in) {return '
- <button data-flow-interactive-handler="cancelForm" data-role="cancel"
- class="mw-ui-button mw-ui-destructive mw-ui-quiet
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-cancel'),Array()), 'encq').'</button>
+ <button data-flow-interactive-handler="cancelForm"
+ data-role="cancel"
+ type="reset"
+ class="mw-ui-button mw-ui-destructive mw-ui-quiet
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-cancel'),Array()), 'encq').'</button>
';}).'
-
<small class="flow-terms-of-use
plainlinks">'.LCRun3::ch($cx, 'l10nParse',
Array(Array('flow-terms-of-use-edit'),Array()), 'encq').'</small>
</div>
</form>
diff --git a/handlebars/compiled/flow_block_topic.handlebars.php
b/handlebars/compiled/flow_block_topic.handlebars.php
index 35cb80b..8bf1406 100644
--- a/handlebars/compiled/flow_block_topic.handlebars.php
+++ b/handlebars/compiled/flow_block_topic.handlebars.php
@@ -329,9 +329,10 @@
<div class="flow-form-actions flow-form-collapsible">
<button data-role="submit"
- class="mw-ui-button mw-ui-constructive"
- data-flow-interactive-handler="apiRequest"
-
data-flow-api-handler="submitReply">'.LCRun3::ch($cx, 'l10n',
Array(Array('Reply',((is_array($in) && isset($in['author'])) ? $in['author'] :
null)),Array()), 'encq').'</button>
+ class="mw-ui-button mw-ui-constructive"
+ data-flow-interactive-handler="apiRequest"
+ data-flow-api-handler="submitReply"
+ data-flow-api-target="<
.flow-topic">'.LCRun3::ch($cx, 'l10n', Array(Array('Reply',((is_array($in) &&
isset($in['author'])) ? $in['author'] : null)),Array()), 'encq').'</button>
<button data-flow-api-handler="preview"
data-flow-api-target="< form textarea"
name="preview"
@@ -339,10 +340,11 @@
class="mw-ui-button mw-ui-progressive mw-ui-quiet
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-preview'),Array()), 'encq').'</button>
'.LCRun3::hbch($cx, 'progressiveEnhancement',
Array(Array(),Array('insertionType'=>'insertion','sectionId'=>'flow-cancel-button')),
$in, function($cx, $in) {return '
- <button data-flow-interactive-handler="cancelForm" data-role="cancel"
- class="mw-ui-button mw-ui-destructive mw-ui-quiet
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-cancel'),Array()), 'encq').'</button>
+ <button data-flow-interactive-handler="cancelForm"
+ data-role="cancel"
+ type="reset"
+ class="mw-ui-button mw-ui-destructive mw-ui-quiet
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-cancel'),Array()), 'encq').'</button>
';}).'
-
<small class="flow-terms-of-use
plainlinks">'.LCRun3::ch($cx, 'l10nParse',
Array(Array('flow-terms-of-use-reply'),Array()), 'encq').'</small>
</div>
</form>
diff --git a/handlebars/compiled/flow_block_topic_close.handlebars.php
b/handlebars/compiled/flow_block_topic_close.handlebars.php
index ffcaac5..0f8aafe 100644
--- a/handlebars/compiled/flow_block_topic_close.handlebars.php
+++ b/handlebars/compiled/flow_block_topic_close.handlebars.php
@@ -67,10 +67,11 @@
class="mw-ui-button mw-ui-progressive mw-ui-quiet
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-preview'),Array()), 'encq').'</button>
'.LCRun3::hbch($cx, 'progressiveEnhancement',
Array(Array(),Array('insertionType'=>'insertion','sectionId'=>'flow-cancel-button')),
$in, function($cx, $in) {return '
- <button data-flow-interactive-handler="cancelForm" data-role="cancel"
- class="mw-ui-button mw-ui-destructive mw-ui-quiet
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-cancel'),Array()), 'encq').'</button>
+ <button data-flow-interactive-handler="cancelForm"
+ data-role="cancel"
+ type="reset"
+ class="mw-ui-button mw-ui-destructive mw-ui-quiet
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-cancel'),Array()), 'encq').'</button>
';}).'
-
<small class="flow-terms-of-use plainlinks">
'.((LCRun3::ifvar($cx, ((is_array($in)
&& isset($in['isModerated'])) ? $in['isModerated'] : null))) ? '
'.LCRun3::ch($cx, 'l10nParse',
Array(Array('flow-terms-of-use-reopen-topic'),Array()), 'encq').'
diff --git a/handlebars/compiled/flow_block_topic_edit_post.handlebars.php
b/handlebars/compiled/flow_block_topic_edit_post.handlebars.php
index 85caa57..f5bc53d 100644
--- a/handlebars/compiled/flow_block_topic_edit_post.handlebars.php
+++ b/handlebars/compiled/flow_block_topic_edit_post.handlebars.php
@@ -76,10 +76,11 @@
class="mw-ui-button mw-ui-progressive mw-ui-quiet
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-preview'),Array()), 'encq').'</button>
'.LCRun3::hbch($cx, 'progressiveEnhancement',
Array(Array(),Array('insertionType'=>'insertion','sectionId'=>'flow-cancel-button')),
$in, function($cx, $in) {return '
- <button data-flow-interactive-handler="cancelForm" data-role="cancel"
- class="mw-ui-button mw-ui-destructive mw-ui-quiet
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-cancel'),Array()), 'encq').'</button>
+ <button data-flow-interactive-handler="cancelForm"
+ data-role="cancel"
+ type="reset"
+ class="mw-ui-button mw-ui-destructive mw-ui-quiet
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-cancel'),Array()), 'encq').'</button>
';}).'
-
<small class="flow-terms-of-use plainlinks">'.LCRun3::ch($cx,
'l10nParse', Array(Array('flow-terms-of-use-edit'),Array()), 'encq').'</small>
</div>
</form>
diff --git a/handlebars/compiled/flow_block_topic_edit_title.handlebars.php
b/handlebars/compiled/flow_block_topic_edit_title.handlebars.php
index e7e8ae8..6dc29db 100644
--- a/handlebars/compiled/flow_block_topic_edit_title.handlebars.php
+++ b/handlebars/compiled/flow_block_topic_edit_title.handlebars.php
@@ -51,8 +51,9 @@
'.LCRun3::hbch($cx, 'progressiveEnhancement',
Array(Array(),Array('insertionType'=>'insertion','sectionId'=>'flow-cancel-button')),
$in, function($cx, $in) {return '
<button data-role="cancel"
-
data-flow-interactive-handler="cancelForm"
- class="mw-ui-button mw-ui-destructive
mw-ui-quiet">'.LCRun3::ch($cx, 'l10n', Array(Array('flow-cancel'),Array()),
'encq').'</button>
+ type="reset"
+ data-flow-interactive-handler="cancelForm"
+ class="mw-ui-button mw-ui-destructive
mw-ui-quiet">'.LCRun3::ch($cx, 'l10n', Array(Array('flow-cancel'),Array()),
'encq').'</button>
<small class="flow-terms-of-use
plainlinks">'.LCRun3::ch($cx, 'l10nParse',
Array(Array('flow-terms-of-use-edit'),Array()), 'encq').'</small>
';}).'
</div>
diff --git a/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
b/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
index 679df3e..0e9e083 100644
--- a/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
+++ b/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
@@ -49,7 +49,9 @@
data-flow-api-handler="moderatePost"
class="mw-ui-button
mw-ui-constructive">'.LCRun3::ch($cx, 'l10n', Array(Array(LCRun3::ch($cx,
'concat',
Array(Array('flow-moderation-confirm-',((is_array($cx['scopes'][0]['submitted'])
&& isset($cx['scopes'][0]['submitted']['moderationState'])) ?
$cx['scopes'][0]['submitted']['moderationState'] : null),'-post'),Array()),
'raw')),Array()), 'encq').'</button>
<a data-flow-interactive-handler="cancelForm"
- class="mw-ui-button mw-ui-destructive mw-ui-quiet"
href="'.htmlentities(((is_array($in['links']['topic']) &&
isset($in['links']['topic']['url'])) ? $in['links']['topic']['url'] : null),
ENT_QUOTES, 'UTF-8').'" title="'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-cancel'),Array()), 'encq').'">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-cancel'),Array()), 'encq').'</a>
+ class="mw-ui-button mw-ui-destructive mw-ui-quiet"
+ href="'.htmlentities(((is_array($in['links']['topic']) &&
isset($in['links']['topic']['url'])) ? $in['links']['topic']['url'] : null),
ENT_QUOTES, 'UTF-8').'"
+ title="'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-cancel'),Array()), 'encq').'">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-cancel'),Array()), 'encq').'</a>
</div>
</form>
diff --git a/handlebars/compiled/flow_block_topic_reply.handlebars.php
b/handlebars/compiled/flow_block_topic_reply.handlebars.php
index 10cb7f6..6548fe9 100644
--- a/handlebars/compiled/flow_block_topic_reply.handlebars.php
+++ b/handlebars/compiled/flow_block_topic_reply.handlebars.php
@@ -61,10 +61,11 @@
class="mw-ui-button mw-ui-progressive mw-ui-quiet
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-preview'),Array()), 'encq').'</button>
'.LCRun3::hbch($cx, 'progressiveEnhancement',
Array(Array(),Array('insertionType'=>'insertion','sectionId'=>'flow-cancel-button')),
$in, function($cx, $in) {return '
- <button data-flow-interactive-handler="cancelForm" data-role="cancel"
- class="mw-ui-button mw-ui-destructive mw-ui-quiet
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-cancel'),Array()), 'encq').'</button>
+ <button data-flow-interactive-handler="cancelForm"
+ data-role="cancel"
+ type="reset"
+ class="mw-ui-button mw-ui-destructive mw-ui-quiet
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-cancel'),Array()), 'encq').'</button>
';}).'
-
<small class="flow-terms-of-use
plainlinks">'.LCRun3::ch($cx, 'l10nParse',
Array(Array('flow-terms-of-use-reply'),Array()), 'encq').'</small>
</div>
</form>
diff --git a/handlebars/compiled/flow_block_topiclist.handlebars.php
b/handlebars/compiled/flow_block_topiclist.handlebars.php
index 73fe003..bbeeab5 100644
--- a/handlebars/compiled/flow_block_topiclist.handlebars.php
+++ b/handlebars/compiled/flow_block_topiclist.handlebars.php
@@ -147,10 +147,11 @@
class="mw-ui-button mw-ui-progressive mw-ui-quiet
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-preview'),Array()), 'encq').'</button>
'.LCRun3::hbch($cx, 'progressiveEnhancement',
Array(Array(),Array('insertionType'=>'insertion','sectionId'=>'flow-cancel-button')),
$in, function($cx, $in) {return '
- <button data-flow-interactive-handler="cancelForm" data-role="cancel"
- class="mw-ui-button mw-ui-destructive mw-ui-quiet
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-cancel'),Array()), 'encq').'</button>
+ <button data-flow-interactive-handler="cancelForm"
+ data-role="cancel"
+ type="reset"
+ class="mw-ui-button mw-ui-destructive mw-ui-quiet
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-cancel'),Array()), 'encq').'</button>
';}).'
-
<small class="flow-terms-of-use
plainlinks">'.LCRun3::ch($cx, 'l10nParse',
Array(Array('flow-terms-of-use-new-topic'),Array()), 'encq').'</small>
</div>
</form>
@@ -456,9 +457,10 @@
<div class="flow-form-actions flow-form-collapsible">
<button data-role="submit"
- class="mw-ui-button mw-ui-constructive"
- data-flow-interactive-handler="apiRequest"
-
data-flow-api-handler="submitReply">'.LCRun3::ch($cx, 'l10n',
Array(Array('Reply',((is_array($in) && isset($in['author'])) ? $in['author'] :
null)),Array()), 'encq').'</button>
+ class="mw-ui-button mw-ui-constructive"
+ data-flow-interactive-handler="apiRequest"
+ data-flow-api-handler="submitReply"
+ data-flow-api-target="<
.flow-topic">'.LCRun3::ch($cx, 'l10n', Array(Array('Reply',((is_array($in) &&
isset($in['author'])) ? $in['author'] : null)),Array()), 'encq').'</button>
<button data-flow-api-handler="preview"
data-flow-api-target="< form textarea"
name="preview"
@@ -466,10 +468,11 @@
class="mw-ui-button mw-ui-progressive mw-ui-quiet
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-preview'),Array()), 'encq').'</button>
'.LCRun3::hbch($cx, 'progressiveEnhancement',
Array(Array(),Array('insertionType'=>'insertion','sectionId'=>'flow-cancel-button')),
$in, function($cx, $in) {return '
- <button data-flow-interactive-handler="cancelForm" data-role="cancel"
- class="mw-ui-button mw-ui-destructive mw-ui-quiet
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-cancel'),Array()), 'encq').'</button>
+ <button data-flow-interactive-handler="cancelForm"
+ data-role="cancel"
+ type="reset"
+ class="mw-ui-button mw-ui-destructive mw-ui-quiet
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-cancel'),Array()), 'encq').'</button>
';}).'
-
<small class="flow-terms-of-use
plainlinks">'.LCRun3::ch($cx, 'l10nParse',
Array(Array('flow-terms-of-use-reply'),Array()), 'encq').'</small>
</div>
</form>
diff --git a/handlebars/compiled/flow_block_topiclist_newtopic.handlebars.php
b/handlebars/compiled/flow_block_topiclist_newtopic.handlebars.php
index d9d3d15..9ac5969 100644
--- a/handlebars/compiled/flow_block_topiclist_newtopic.handlebars.php
+++ b/handlebars/compiled/flow_block_topiclist_newtopic.handlebars.php
@@ -78,10 +78,11 @@
class="mw-ui-button mw-ui-progressive mw-ui-quiet
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-preview'),Array()), 'encq').'</button>
'.LCRun3::hbch($cx, 'progressiveEnhancement',
Array(Array(),Array('insertionType'=>'insertion','sectionId'=>'flow-cancel-button')),
$in, function($cx, $in) {return '
- <button data-flow-interactive-handler="cancelForm" data-role="cancel"
- class="mw-ui-button mw-ui-destructive mw-ui-quiet
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-cancel'),Array()), 'encq').'</button>
+ <button data-flow-interactive-handler="cancelForm"
+ data-role="cancel"
+ type="reset"
+ class="mw-ui-button mw-ui-destructive mw-ui-quiet
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-cancel'),Array()), 'encq').'</button>
';}).'
-
<small class="flow-terms-of-use
plainlinks">'.LCRun3::ch($cx, 'l10nParse',
Array(Array('flow-terms-of-use-new-topic'),Array()), 'encq').'</small>
</div>
</form>
diff --git a/handlebars/compiled/flow_block_topicsummary_edit.handlebars.php
b/handlebars/compiled/flow_block_topicsummary_edit.handlebars.php
index 97295f5..b7d3100 100644
--- a/handlebars/compiled/flow_block_topicsummary_edit.handlebars.php
+++ b/handlebars/compiled/flow_block_topicsummary_edit.handlebars.php
@@ -64,10 +64,11 @@
class="mw-ui-button mw-ui-progressive mw-ui-quiet
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-preview'),Array()), 'encq').'</button>
'.LCRun3::hbch($cx, 'progressiveEnhancement',
Array(Array(),Array('insertionType'=>'insertion','sectionId'=>'flow-cancel-button')),
$in, function($cx, $in) {return '
- <button data-flow-interactive-handler="cancelForm" data-role="cancel"
- class="mw-ui-button mw-ui-destructive mw-ui-quiet
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-cancel'),Array()), 'encq').'</button>
+ <button data-flow-interactive-handler="cancelForm"
+ data-role="cancel"
+ type="reset"
+ class="mw-ui-button mw-ui-destructive mw-ui-quiet
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-cancel'),Array()), 'encq').'</button>
';}).'
-
<small class="flow-terms-of-use
plainlinks">'.LCRun3::ch($cx, 'l10nParse',
Array(Array('flow-terms-of-use-summarize'),Array()), 'encq').'</small>
</div>
</form>
diff --git a/handlebars/compiled/flow_form_buttons.handlebars.php
b/handlebars/compiled/flow_form_buttons.handlebars.php
index 66ae62c..c7ba98b 100644
--- a/handlebars/compiled/flow_form_buttons.handlebars.php
+++ b/handlebars/compiled/flow_form_buttons.handlebars.php
@@ -25,9 +25,10 @@
class="mw-ui-button mw-ui-progressive mw-ui-quiet
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-preview'),Array()), 'encq').'</button>
'.LCRun3::hbch($cx, 'progressiveEnhancement',
Array(Array(),Array('insertionType'=>'insertion','sectionId'=>'flow-cancel-button')),
$in, function($cx, $in) {return '
- <button data-flow-interactive-handler="cancelForm" data-role="cancel"
- class="mw-ui-button mw-ui-destructive mw-ui-quiet
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-cancel'),Array()), 'encq').'</button>
-';}).'
-';
+ <button data-flow-interactive-handler="cancelForm"
+ data-role="cancel"
+ type="reset"
+ class="mw-ui-button mw-ui-destructive mw-ui-quiet
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n',
Array(Array('flow-cancel'),Array()), 'encq').'</button>
+';}).'';
}
?>
\ No newline at end of file
diff --git a/handlebars/flow_edit_topic_title.handlebars
b/handlebars/flow_edit_topic_title.handlebars
index 5ef0d24..5afd9f4 100644
--- a/handlebars/flow_edit_topic_title.handlebars
+++ b/handlebars/flow_edit_topic_title.handlebars
@@ -18,8 +18,9 @@
{{#progressiveEnhancement insertionType="insertion"
sectionId="flow-cancel-button"}}
<button data-role="cancel"
-
data-flow-interactive-handler="cancelForm"
- class="mw-ui-button mw-ui-destructive
mw-ui-quiet">{{l10n "flow-cancel"}}</button>
+ type="reset"
+ data-flow-interactive-handler="cancelForm"
+ class="mw-ui-button mw-ui-destructive
mw-ui-quiet">{{l10n "flow-cancel"}}</button>
<small class="flow-terms-of-use plainlinks">{{l10nParse
"flow-terms-of-use-edit"}}</small>
{{/progressiveEnhancement}}
</div>
diff --git a/handlebars/flow_form_buttons.handlebars
b/handlebars/flow_form_buttons.handlebars
index c846c60..2ef9ffe 100644
--- a/handlebars/flow_form_buttons.handlebars
+++ b/handlebars/flow_form_buttons.handlebars
@@ -7,6 +7,8 @@
</button>
{{#progressiveEnhancement insertionType="insertion"
sectionId="flow-cancel-button"}}
- <button data-flow-interactive-handler="cancelForm" data-role="cancel"
- class="mw-ui-button mw-ui-destructive mw-ui-quiet
mw-ui-flush-right">{{l10n "flow-cancel"}}</button>
-{{/progressiveEnhancement}}
+ <button data-flow-interactive-handler="cancelForm"
+ data-role="cancel"
+ type="reset"
+ class="mw-ui-button mw-ui-destructive mw-ui-quiet
mw-ui-flush-right">{{l10n "flow-cancel"}}</button>
+{{/progressiveEnhancement}}
\ No newline at end of file
diff --git a/handlebars/flow_moderate_post.handlebars
b/handlebars/flow_moderate_post.handlebars
index 06d7f64..6270993 100644
--- a/handlebars/flow_moderate_post.handlebars
+++ b/handlebars/flow_moderate_post.handlebars
@@ -14,7 +14,9 @@
{{~l10n (concat "flow-moderation-confirm-"
@root.submitted.moderationState "-post")~}}
</button>
<a data-flow-interactive-handler="cancelForm"
- class="mw-ui-button mw-ui-destructive mw-ui-quiet"
href="{{links.topic.url}}" title="{{l10n "flow-cancel"}}">
+ class="mw-ui-button mw-ui-destructive mw-ui-quiet"
+ href="{{links.topic.url}}"
+ title="{{l10n "flow-cancel"}}">
{{~l10n "flow-cancel"~}}
</a>
</div>
diff --git a/handlebars/flow_reply_form.handlebars
b/handlebars/flow_reply_form.handlebars
index eea79c0..b043efd 100644
--- a/handlebars/flow_reply_form.handlebars
+++ b/handlebars/flow_reply_form.handlebars
@@ -24,10 +24,11 @@
<div class="flow-form-actions flow-form-collapsible">
<button data-role="submit"
- class="mw-ui-button mw-ui-constructive"
- data-flow-interactive-handler="apiRequest"
- data-flow-api-handler="submitReply">
- {{~l10n "Reply" author~}}
+ class="mw-ui-button mw-ui-constructive"
+ data-flow-interactive-handler="apiRequest"
+ data-flow-api-handler="submitReply"
+ data-flow-api-target="< .flow-topic">
+ {{~l10n "Reply" author~}}
</button>
{{> flow_form_buttons }}
<small class="flow-terms-of-use plainlinks">{{l10nParse
"flow-terms-of-use-reply"}}</small>
diff --git a/modules/new/components/flow-board.js
b/modules/new/components/flow-board.js
index 7939f1a..e9ecc80 100644
--- a/modules/new/components/flow-board.js
+++ b/modules/new/components/flow-board.js
@@ -851,10 +851,11 @@
$( this ).val( this.defaultValue );
} );
- flowBoardComponentRefreshTopic( info.$target,
data.flow.reply.result.topic );
-
// Trigger a click on cancel to have it destroy the
form the way it should
$form.find( 'button, input, a' ).filter(
'[data-flow-interactive-handler="cancelForm"]' ).trigger( 'click' );
+
+ // Target should be flow-topic
+ flowBoardComponentRefreshTopic( info.$target,
data.flow.reply.result.topic );
};
/**
--
To view, visit https://gerrit.wikimedia.org/r/150998
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I12c5d1eb651254151cf237f633c64fc25f97c589
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: SG <[email protected]>
Gerrit-Reviewer: Bsitu <[email protected]>
Gerrit-Reviewer: EBernhardson <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: Matthias Mullie <[email protected]>
Gerrit-Reviewer: SG <[email protected]>
Gerrit-Reviewer: Werdna <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits