Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15370064
D11809.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D11809.diff
View Options
diff --git a/src/applications/legalpad/controller/LegalpadDocumentSignController.php b/src/applications/legalpad/controller/LegalpadDocumentSignController.php
--- a/src/applications/legalpad/controller/LegalpadDocumentSignController.php
+++ b/src/applications/legalpad/controller/LegalpadDocumentSignController.php
@@ -180,11 +180,19 @@
if (!$errors) {
$signature->save();
- // If the viewer is logged in, send them to the document page, which
- // will show that they have signed the document. Otherwise, send them
- // to a completion page.
+ // If the viewer is logged in, signing for themselves, send them to
+ // the document page, which will show that they have signed the
+ // document. Unless of course they were required to sign the
+ // document to use Phabricator; in that case try really hard to
+ // re-direct them to where they wanted to go.
+ //
+ // Otherwise, send them to a completion page.
if ($viewer->isLoggedIn() && $is_individual) {
$next_uri = '/'.$document->getMonogram();
+ if ($document->getRequireSignature()) {
+ $request_uri = $request->getRequestURI();
+ $next_uri = (string) $request_uri;
+ }
} else {
$this->sendVerifySignatureEmail(
$document,
@@ -401,11 +409,19 @@
'agree',
'agree',
pht('I agree to the terms laid forth above.'),
- false))
+ false));
+ if ($document->getRequireSignature()) {
+ $cancel_uri = '/logout/';
+ $cancel_text = pht('Log Out');
+ } else {
+ $cancel_uri = $this->getApplicationURI();
+ $cancel_text = pht('Cancel');
+ }
+ $form
->appendChild(
id(new AphrontFormSubmitControl())
->setValue(pht('Sign Document'))
- ->addCancelButton($this->getApplicationURI()));
+ ->addCancelButton($cancel_uri, $cancel_text));
return $form;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 13, 9:02 AM (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7613758
Default Alt Text
D11809.diff (1 KB)
Attached To
Mode
D11809: Legalpad - make "Cancel" button "Log Out" button for required signature documents
Attached
Detach File
Event Timeline
Log In to Comment