jenkins-bot has submitted this change and it was merged.
Change subject: (bug 39773) Fix "You cannot post a blank message" error on
every summary edit
......................................................................
(bug 39773) Fix "You cannot post a blank message" error on every summary edit
Standardise the handling of edit form wrappers -- they are all now
added in the show{PostEditing,NewThread,Summarize,Reply}Form
functions instead of in various random places and nested and so
on.
Change-Id: If3e53bb9741e268d678c36777fd2ec1f06008204
---
M classes/View.php
M lqt.js
M pages/TalkpageView.php
3 files changed, 18 insertions(+), 5 deletions(-)
Approvals:
Alex Monk: Looks good to me, approved
jenkins-bot: Verified
diff --git a/classes/View.php b/classes/View.php
index f453725..3a1232d 100644
--- a/classes/View.php
+++ b/classes/View.php
@@ -489,6 +489,10 @@
}
}
+ $html = Xml::openElement( 'div',
+ array( 'class' => 'lqt-edit-form lqt-new-thread' ) );
+ $this->output->addHTML( $html );
+
$article = new Article( $t, 0 );
LqtHooks::$editTalkpage = $talkpage;
@@ -574,6 +578,8 @@
}
$this->output->redirect( $this->title->getLocalURL()
);
}
+
+ $this->output->addHTML( '</div>' );
}
/**
@@ -593,7 +599,7 @@
}
$html = Xml::openElement( 'div',
- array( 'class' => 'lqt-reply-form' ) );
+ array( 'class' => 'lqt-reply-form
lqt-edit-form' ) );
$this->output->addHTML( $html );
@@ -697,6 +703,10 @@
$nonce_key = wfMemcKey( 'lqt-nonce', $submitted_nonce,
$this->user->getName() );
if ( ! $this->handleNonce( $submitted_nonce, $nonce_key ) )
return;
+ $html = Xml::openElement( 'div',
+ array( 'class' => 'lqt-edit-form' ) );
+ $this->output->addHTML( $html );
+
$subject = $this->request->getVal( 'lqt_subject_field', '' );
if ( !$subject ) {
@@ -792,6 +802,7 @@
$this->output->redirect( $this->title->getLocalURL()
);
}
+ $this->output->addHTML( '</div>' );
}
/**
@@ -808,6 +819,10 @@
$t = $this->newSummaryTitle( $thread );
$article = new Article( $t, 0 );
}
+
+ $html = Xml::openElement( 'div',
+ array( 'class' => 'lqt-edit-form lqt-summarize-form' )
);
+ $this->output->addHTML( $html );
$this->output->addWikiMsg( 'lqt-summarize-intro' );
@@ -861,6 +876,7 @@
$this->output->redirect( $this->title->getLocalURL()
);
}
+ $this->output->addHTML( '</div>' );
}
public function handleNonce( $submitted_nonce, $nonce_key ) {
diff --git a/lqt.js b/lqt.js
index 1c91b3a..82b6376 100644
--- a/lqt.js
+++ b/lqt.js
@@ -252,7 +252,7 @@
liquidThreads.apiRequest( params,
function(result) {
var content =
$(result.threadaction.inlineeditform.html);
- $(container).empty().append(content);
+ $(container).empty().append( content.contents()
);
callback();
} );
diff --git a/pages/TalkpageView.php b/pages/TalkpageView.php
index 6712101..bd20d55 100644
--- a/pages/TalkpageView.php
+++ b/pages/TalkpageView.php
@@ -323,10 +323,7 @@
}
if ( $this->methodApplies( 'talkpage_new_thread' ) ) {
- $params = array( 'class' => 'lqt-new-thread
lqt-edit-form' );
- $this->output->addHTML( Xml::openElement( 'div',
$params ) );
$this->showNewThreadForm( $this->talkpage );
- $this->output->addHTML( Xml::closeElement( 'div' ) );
} else {
$this->output->addHTML( Xml::tags( 'div',
array( 'class' => 'lqt-new-thread
lqt-edit-form' ), '' ) );
--
To view, visit https://gerrit.wikimedia.org/r/27844
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If3e53bb9741e268d678c36777fd2ec1f06008204
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/LiquidThreads
Gerrit-Branch: master
Gerrit-Owner: RobLa <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: Daniel Friesen <[email protected]>
Gerrit-Reviewer: Dereckson <[email protected]>
Gerrit-Reviewer: Helder.wiki <[email protected]>
Gerrit-Reviewer: IAlex <[email protected]>
Gerrit-Reviewer: Michał Łazowik <[email protected]>
Gerrit-Reviewer: Nemo bis <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: Nimish Gautam <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: Rfaulk <[email protected]>
Gerrit-Reviewer: RobLa <[email protected]>
Gerrit-Reviewer: Sumanah <[email protected]>
Gerrit-Reviewer: Trevor Parscal <[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