Changeset View
Changeset View
Standalone View
Standalone View
src/applications/ponder/view/PonderAddAnswerView.php
Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | $form | ||||
->setID('answer-content') | ->setID('answer-content') | ||||
->setViewer($viewer)) | ->setViewer($viewer)) | ||||
->appendChild( | ->appendChild( | ||||
id(new AphrontFormSubmitControl()) | id(new AphrontFormSubmitControl()) | ||||
->setValue(pht('Add Answer'))); | ->setValue(pht('Add Answer'))); | ||||
if (!$viewer->isLoggedIn()) { | if (!$viewer->isLoggedIn()) { | ||||
$login_href = id(new PhutilURI('/auth/start/')) | $login_href = id(new PhutilURI('/auth/start/')) | ||||
->setQueryParam('next', '/Q'.$question->getID()); | ->replaceQueryParam('next', '/Q'.$question->getID()); | ||||
$form = id(new PHUIFormLayoutView()) | $form = id(new PHUIFormLayoutView()) | ||||
->addClass('login-to-participate') | ->addClass('login-to-participate') | ||||
->appendChild( | ->appendChild( | ||||
id(new PHUIButtonView()) | id(new PHUIButtonView()) | ||||
->setTag('a') | ->setTag('a') | ||||
->setText(pht('Log In to Answer')) | ->setText(pht('Log In to Answer')) | ||||
->setHref((string)$login_href)); | ->setHref((string)$login_href)); | ||||
} | } | ||||
Show All 13 Lines |