1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 16:52:41 +01:00

Move Legalpad signature form inline in document

Summary: This makes it look a little less weird.

Test Plan: {F170217}

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9734
This commit is contained in:
epriestley 2014-06-25 22:02:40 -07:00
parent be47f2141a
commit b1a8dbade6

View file

@ -193,19 +193,25 @@ final class LegalpadDocumentSignController extends LegalpadController {
->setDisabled(!$can_edit) ->setDisabled(!$can_edit)
->setWorkflow(!$can_edit)); ->setWorkflow(!$can_edit));
$content = array( $signature_form = $this->buildSignatureForm(
$this->buildDocument(
$header,
$engine,
$document_body),
$this->buildSignatureForm(
$document_body, $document_body,
$signature, $signature,
$has_signed, $has_signed,
$e_name, $e_name,
$e_email, $e_email,
$e_address_1, $e_address_1);
$error_view));
$content = $this->buildDocument(
$header,
$engine,
$document_body);
$content->appendChild(
array(
id(new PHUIHeaderView())->setHeader(pht('Agree and Sign Document')),
$error_view,
$signature_form,
));
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb($document->getMonogram()); $crumbs->addTextCrumb($document->getMonogram());
@ -240,8 +246,7 @@ final class LegalpadDocumentSignController extends LegalpadController {
$has_signed = false, $has_signed = false,
$e_name = true, $e_name = true,
$e_email = true, $e_email = true,
$e_address_1 = true, $e_address_1 = true) {
$error_view = null) {
$viewer = $this->getRequest()->getUser(); $viewer = $this->getRequest()->getUser();
if ($has_signed) { if ($has_signed) {
@ -297,16 +302,10 @@ final class LegalpadDocumentSignController extends LegalpadController {
->appendChild( ->appendChild(
id(new AphrontFormSubmitControl()) id(new AphrontFormSubmitControl())
->setValue(pht('Sign and Agree')) ->setValue(pht('Sign and Agree'))
->setDisabled($has_signed)); ->setDisabled($has_signed)
->addCancelButton($this->getApplicationURI()));
$view = id(new PHUIObjectBoxView()) return $form;
->setHeaderText(pht('Sign and Agree'))
->setForm($form);
if ($error_view) {
$view->setErrorView($error_view);
}
return $view;
} }
private function getVerifiedSignatureBlurb() { private function getVerifiedSignatureBlurb() {