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( $document_body,
$header, $signature,
$engine, $has_signed,
$document_body), $e_name,
$this->buildSignatureForm( $e_email,
$document_body, $e_address_1);
$signature,
$has_signed, $content = $this->buildDocument(
$e_name, $header,
$e_email, $engine,
$e_address_1, $document_body);
$error_view));
$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() {