Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15408085
D7463.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
6 KB
Referenced Files
None
Subscribers
None
D7463.diff
View Options
Index: src/__celerity_resource_map__.php
===================================================================
--- src/__celerity_resource_map__.php
+++ src/__celerity_resource_map__.php
@@ -2981,15 +2981,6 @@
),
'disk' => '/rsrc/externals/javelin/lib/Workflow.js',
),
- 'legalpad-documentbody-css' =>
- array(
- 'uri' => '/res/034c3494/rsrc/css/application/legalpad/legalpad-documentbody.css',
- 'type' => 'css',
- 'requires' =>
- array(
- ),
- 'disk' => '/rsrc/css/application/legalpad/legalpad-documentbody.css',
- ),
'lightbox-attachment-css' =>
array(
'uri' => '/res/4657e15d/rsrc/css/aphront/lightbox-attachment.css',
Index: src/applications/legalpad/controller/LegalpadDocumentSignController.php
===================================================================
--- src/applications/legalpad/controller/LegalpadDocumentSignController.php
+++ src/applications/legalpad/controller/LegalpadDocumentSignController.php
@@ -47,7 +47,8 @@
$has_signed = true;
$error_view = id(new AphrontErrorView())
->setSeverity(AphrontErrorView::SEVERITY_NOTICE)
- ->setTitle(pht('You have already agreed to these terms.'));
+ ->setTitle(pht('Already Signed'))
+ ->appendChild(pht('Thank you for signing and agreeing'));
$data = $signature->getSignatureData();
}
@@ -101,7 +102,8 @@
$has_signed = true;
$error_view = id(new AphrontErrorView())
->setSeverity(AphrontErrorView::SEVERITY_NOTICE)
- ->setTitle(pht('Signature successful. Thank you.'));
+ ->setTitle(pht('Signature successful'))
+ ->appendChild(pht('Thank you for signing and agreeing'));
} else {
$error_view = id(new AphrontErrorView())
->setTitle(pht('Error in submission.'))
@@ -126,14 +128,14 @@
id(new PHUIDocumentView())
->setHeader($header)
->appendChild($this->buildDocument($engine, $document_body)),
- $error_view,
$this->buildSignatureForm(
$document_body,
$signature,
$has_signed,
$e_name,
$e_email,
- $e_address_1));
+ $e_address_1,
+ $error_view));
return $this->buildApplicationPage(
$content,
@@ -148,15 +150,7 @@
PhabricatorMarkupEngine
$engine, LegalpadDocumentBody $body) {
- require_celerity_resource('legalpad-documentbody-css');
-
- return phutil_tag(
- 'div',
- array(
- 'class' => 'legalpad-documentbody'
- ),
- $engine->getOutput($body, LegalpadDocumentBody::MARKUP_FIELD_TEXT));
-
+ return $engine->getOutput($body, LegalpadDocumentBody::MARKUP_FIELD_TEXT);
}
private function buildSignatureForm(
@@ -165,7 +159,8 @@
$has_signed = false,
$e_name = true,
$e_email = true,
- $e_address_1 = true) {
+ $e_address_1 = true,
+ $error_view = null) {
$user = $this->getRequest()->getUser();
if ($has_signed) {
@@ -178,57 +173,55 @@
$form = id(new AphrontFormView())
->setUser($user)
->appendChild(
- id(new AphrontFormInsetView())
- ->setTitle(pht('Sign and Agree'))
- ->setDescription($instructions)
- ->setContent(phutil_tag('br', array()))
- ->appendChild(
- id(new AphrontFormTextControl())
- ->setLabel(pht('Name'))
- ->setValue(idx($data, 'name', ''))
- ->setName('name')
- ->setError($e_name)
- ->setDisabled($has_signed))
- ->appendChild(
- id(new AphrontFormTextControl())
- ->setLabel(pht('Email'))
- ->setValue(idx($data, 'email', ''))
- ->setName('email')
- ->setError($e_email)
- ->setDisabled($has_signed))
- ->appendChild(
- id(new AphrontFormTextControl())
- ->setLabel(pht('Address line 1'))
- ->setValue(idx($data, 'address_1', ''))
- ->setName('address_1')
- ->setError($e_address_1)
- ->setDisabled($has_signed))
- ->appendChild(
- id(new AphrontFormTextControl())
- ->setLabel(pht('Address line 2'))
- ->setValue(idx($data, 'address_2', ''))
- ->setName('address_2')
- ->setDisabled($has_signed))
- ->appendChild(
- id(new AphrontFormTextControl())
- ->setLabel(pht('Phone'))
- ->setValue(idx($data, 'phone', ''))
- ->setName('phone')
- ->setDisabled($has_signed))
- ->appendChild(
- id(new AphrontFormCheckboxControl())
- ->addCheckbox(
- 'agree',
- 'agree',
- pht('I agree to the terms laid forth above.'),
- $has_signed)
- ->setDisabled($has_signed))
- ->appendChild(
- id(new AphrontFormSubmitControl())
- ->setValue(pht('Sign and Agree'))
- ->setDisabled($has_signed)));
-
- return $form;
+ id(new AphrontFormTextControl())
+ ->setLabel(pht('Name'))
+ ->setValue(idx($data, 'name', ''))
+ ->setName('name')
+ ->setError($e_name)
+ ->setDisabled($has_signed))
+ ->appendChild(
+ id(new AphrontFormTextControl())
+ ->setLabel(pht('Email'))
+ ->setValue(idx($data, 'email', ''))
+ ->setName('email')
+ ->setError($e_email)
+ ->setDisabled($has_signed))
+ ->appendChild(
+ id(new AphrontFormTextControl())
+ ->setLabel(pht('Address line 1'))
+ ->setValue(idx($data, 'address_1', ''))
+ ->setName('address_1')
+ ->setError($e_address_1)
+ ->setDisabled($has_signed))
+ ->appendChild(
+ id(new AphrontFormTextControl())
+ ->setLabel(pht('Address line 2'))
+ ->setValue(idx($data, 'address_2', ''))
+ ->setName('address_2')
+ ->setDisabled($has_signed))
+ ->appendChild(
+ id(new AphrontFormTextControl())
+ ->setLabel(pht('Phone'))
+ ->setValue(idx($data, 'phone', ''))
+ ->setName('phone')
+ ->setDisabled($has_signed))
+ ->appendChild(
+ id(new AphrontFormCheckboxControl())
+ ->addCheckbox(
+ 'agree',
+ 'agree',
+ pht('I agree to the terms laid forth above.'),
+ $has_signed)
+ ->setDisabled($has_signed))
+ ->appendChild(
+ id(new AphrontFormSubmitControl())
+ ->setValue(pht('Sign and Agree'))
+ ->setDisabled($has_signed));
+
+ return id(new PHUIObjectBoxView())
+ ->setHeaderText(pht('Sign and Agree'))
+ ->setFormError($error_view)
+ ->setForm($form);
}
}
Index: webroot/rsrc/css/application/legalpad/legalpad-documentbody.css
===================================================================
--- webroot/rsrc/css/application/legalpad/legalpad-documentbody.css
+++ /dev/null
@@ -1,9 +0,0 @@
-/**
- * @provides legalpad-documentbody-css
- */
-
-.legalpad-documentbody {
- position: relative;
- padding: 1.25em 2%
-}
-
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 19, 9:16 PM (1 d, 6 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7707256
Default Alt Text
D7463.diff (6 KB)
Attached To
Mode
D7463: Clean up legalpad sign UI
Attached
Detach File
Event Timeline
Log In to Comment