Page MenuHomePhabricator

D14012.diff
No OneTemporary

D14012.diff

diff --git a/src/applications/ponder/view/PonderAddAnswerView.php b/src/applications/ponder/view/PonderAddAnswerView.php
--- a/src/applications/ponder/view/PonderAddAnswerView.php
+++ b/src/applications/ponder/view/PonderAddAnswerView.php
@@ -90,6 +90,18 @@
id(new AphrontFormSubmitControl())
->setValue(pht('Add Answer')));
+ if (!$viewer->isLoggedIn()) {
+ $login_href = id(new PhutilURI('/auth/start/'))
+ ->setQueryParam('next', '/Q'.$question->getID());
+ $form = id(new PHUIFormLayoutView())
+ ->addClass('login-to-participate')
+ ->appendChild(
+ id(new PHUIButtonView())
+ ->setTag('a')
+ ->setText(pht('Login to Answer'))
+ ->setHref((string)$login_href));
+ }
+
$box = id(new PHUIObjectBoxView())
->setHeader($header)
->appendChild($form);

File Metadata

Mime Type
text/plain
Expires
Wed, Dec 25, 8:25 AM (9 h, 23 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6925618
Default Alt Text
D14012.diff (867 B)

Event Timeline