Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14410950
D14012.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
867 B
Referenced Files
None
Subscribers
None
D14012.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D14012: Show "Login to Answer" in Ponder if viewer is logged out
Attached
Detach File
Event Timeline
Log In to Comment