Redesign Legalpad
Summary: Rolls out PHUIDocumentViewPro to Legalpad. Minor tweaks to provide space around Preamble and Signature blocks. Otherwise, straight forward.
Test Plan:
Build a new document with and without Preamble, sign document.
{F933386}
Reviewers: epriestley
Reviewed By: epriestley
Subscribers: Korvin
Differential Revision: https://secure.phabricator.com/D14377
This commit is contained in:
@@ -253,7 +253,7 @@ final class LegalpadDocumentSignController extends LegalpadController {
|
||||
->setIcon(
|
||||
id(new PHUIIconView())
|
||||
->setIconFont('fa-pencil'))
|
||||
->setText(pht('Manage Document'))
|
||||
->setText(pht('Manage'))
|
||||
->setHref($manage_uri)
|
||||
->setDisabled(!$can_edit)
|
||||
->setWorkflow(!$can_edit));
|
||||
@@ -278,7 +278,7 @@ final class LegalpadDocumentSignController extends LegalpadController {
|
||||
$preamble_box->addPropertyList($preamble);
|
||||
}
|
||||
|
||||
$content = id(new PHUIDocumentView())
|
||||
$content = id(new PHUIDocumentViewPro())
|
||||
->addClass('legalpad')
|
||||
->setHeader($header)
|
||||
->appendChild(
|
||||
@@ -288,6 +288,7 @@ final class LegalpadDocumentSignController extends LegalpadController {
|
||||
$document_markup,
|
||||
));
|
||||
|
||||
$signature_box = null;
|
||||
if (!$has_signed) {
|
||||
$error_view = null;
|
||||
if ($errors) {
|
||||
@@ -301,23 +302,21 @@ final class LegalpadDocumentSignController extends LegalpadController {
|
||||
$field_errors);
|
||||
|
||||
switch ($document->getSignatureType()) {
|
||||
case LegalpadDocument::SIGNATURE_TYPE_NONE:
|
||||
$subheader = null;
|
||||
default:
|
||||
break;
|
||||
case LegalpadDocument::SIGNATURE_TYPE_INDIVIDUAL:
|
||||
case LegalpadDocument::SIGNATURE_TYPE_CORPORATION:
|
||||
$subheader = id(new PHUIHeaderView())
|
||||
->setHeader(pht('Agree and Sign Document'))
|
||||
->setBleedHeader(true);
|
||||
$box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Agree and Sign Document'))
|
||||
->setForm($signature_form);
|
||||
if ($error_view) {
|
||||
$box->setInfoView($error_view);
|
||||
}
|
||||
$signature_box = phutil_tag_div('phui-document-view-pro-box', $box);
|
||||
break;
|
||||
}
|
||||
|
||||
$content->appendChild(
|
||||
array(
|
||||
$subheader,
|
||||
$error_view,
|
||||
$signature_form,
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
@@ -328,9 +327,11 @@ final class LegalpadDocumentSignController extends LegalpadController {
|
||||
array(
|
||||
$crumbs,
|
||||
$content,
|
||||
$signature_box,
|
||||
),
|
||||
array(
|
||||
'title' => $title,
|
||||
'class' => 'pro-white-background',
|
||||
'pageObjects' => array($document->getPHID()),
|
||||
));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user