Legalpad - fix requires signature transaction from always being saved
Summary: Fixes T7295. Humbling debugging experience but I got it. Test Plan: saved a legalpad doc without edits over and over and saw no "requires signature" transaction. toggled "requires signature", saved, and saw the transaction. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T7295 Differential Revision: https://secure.phabricator.com/D11785
This commit is contained in:
@@ -51,7 +51,7 @@ final class LegalpadDocumentEditor
|
||||
case LegalpadTransactionType::TYPE_PREAMBLE:
|
||||
return $object->getPreamble();
|
||||
case LegalpadTransactionType::TYPE_REQUIRE_SIGNATURE:
|
||||
return $object->getRequireSignature();
|
||||
return (bool)$object->getRequireSignature();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,8 +64,9 @@ final class LegalpadDocumentEditor
|
||||
case LegalpadTransactionType::TYPE_TEXT:
|
||||
case LegalpadTransactionType::TYPE_SIGNATURE_TYPE:
|
||||
case LegalpadTransactionType::TYPE_PREAMBLE:
|
||||
case LegalpadTransactionType::TYPE_REQUIRE_SIGNATURE:
|
||||
return $xaction->getNewValue();
|
||||
case LegalpadTransactionType::TYPE_REQUIRE_SIGNATURE:
|
||||
return (bool)$xaction->getNewValue();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,7 +93,7 @@ final class LegalpadDocumentEditor
|
||||
$object->setPreamble($xaction->getNewValue());
|
||||
break;
|
||||
case LegalpadTransactionType::TYPE_REQUIRE_SIGNATURE:
|
||||
$object->setRequireSignature($xaction->getNewValue());
|
||||
$object->setRequireSignature((int)$xaction->getNewValue());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user