@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix a runaway indentation level in LegalpadDocumentEditEngine

Summary: Ref T12685.

Test Plan: No behavioral changes.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12685

Differential Revision: https://secure.phabricator.com/D17875

+42 -42
+42 -42
src/applications/legalpad/editor/LegalpadDocumentEditEngine.php
··· 114 114 ->setConduitTypeDescription(pht('New document signature type.')) 115 115 ->setValue($object->getSignatureType()) 116 116 ->setOptions(LegalpadDocument::getSignatureTypeMap()) 117 - ->setTransactionType( 117 + ->setTransactionType( 118 118 LegalpadDocumentSignatureTypeTransaction::TRANSACTIONTYPE); 119 - $show_require = true; 120 - } else { 121 - $fields[] = id(new PhabricatorStaticEditField()) 122 - ->setLabel(pht('Who Should Sign?')) 123 - ->setValue($object->getSignatureTypeName()); 124 - $individual = LegalpadDocument::SIGNATURE_TYPE_INDIVIDUAL; 125 - $show_require = $object->getSignatureType() == $individual; 126 - } 127 - 128 - if ($show_require && $is_admin) { 129 - $fields[] = 130 - id(new PhabricatorBoolEditField()) 131 - ->setKey('requireSignature') 132 - ->setOptions( 133 - pht('No Signature Required'), 134 - pht('Signature Required to use Phabricator')) 135 - ->setAsCheckbox(true) 136 - ->setTransactionType( 137 - LegalpadDocumentRequireSignatureTransaction::TRANSACTIONTYPE) 138 - ->setDescription(pht('Marks this document as required signing.')) 139 - ->setConduitDescription( 140 - pht('Marks this document as required signing.')) 141 - ->setValue($object->getRequireSignature()); 142 - } 119 + $show_require = true; 120 + } else { 121 + $fields[] = id(new PhabricatorStaticEditField()) 122 + ->setLabel(pht('Who Should Sign?')) 123 + ->setValue($object->getSignatureTypeName()); 124 + $individual = LegalpadDocument::SIGNATURE_TYPE_INDIVIDUAL; 125 + $show_require = $object->getSignatureType() == $individual; 126 + } 143 127 128 + if ($show_require && $is_admin) { 144 129 $fields[] = 145 - id(new PhabricatorRemarkupEditField()) 146 - ->setKey('preamble') 147 - ->setLabel(pht('Preamble')) 148 - ->setDescription(pht('The preamble of the document.')) 149 - ->setConduitTypeDescription(pht('New document preamble.')) 150 - ->setValue($object->getPreamble()) 130 + id(new PhabricatorBoolEditField()) 131 + ->setKey('requireSignature') 132 + ->setOptions( 133 + pht('No Signature Required'), 134 + pht('Signature Required to use Phabricator')) 135 + ->setAsCheckbox(true) 151 136 ->setTransactionType( 152 - LegalpadDocumentPreambleTransaction::TRANSACTIONTYPE); 137 + LegalpadDocumentRequireSignatureTransaction::TRANSACTIONTYPE) 138 + ->setDescription(pht('Marks this document as required signing.')) 139 + ->setConduitDescription( 140 + pht('Marks this document as required signing.')) 141 + ->setValue($object->getRequireSignature()); 142 + } 153 143 154 - $fields[] = 155 - id(new PhabricatorRemarkupEditField()) 156 - ->setKey('text') 157 - ->setLabel(pht('Document Body')) 158 - ->setDescription(pht('The body of text of the document.')) 159 - ->setConduitTypeDescription(pht('New document body.')) 160 - ->setValue($document_body) 161 - ->setIsRequired(true) 162 - ->setTransactionType( 163 - LegalpadDocumentTextTransaction::TRANSACTIONTYPE); 144 + $fields[] = 145 + id(new PhabricatorRemarkupEditField()) 146 + ->setKey('preamble') 147 + ->setLabel(pht('Preamble')) 148 + ->setDescription(pht('The preamble of the document.')) 149 + ->setConduitTypeDescription(pht('New document preamble.')) 150 + ->setValue($object->getPreamble()) 151 + ->setTransactionType( 152 + LegalpadDocumentPreambleTransaction::TRANSACTIONTYPE); 153 + 154 + $fields[] = 155 + id(new PhabricatorRemarkupEditField()) 156 + ->setKey('text') 157 + ->setLabel(pht('Document Body')) 158 + ->setDescription(pht('The body of text of the document.')) 159 + ->setConduitTypeDescription(pht('New document body.')) 160 + ->setValue($document_body) 161 + ->setIsRequired(true) 162 + ->setTransactionType( 163 + LegalpadDocumentTextTransaction::TRANSACTIONTYPE); 164 164 165 165 return $fields; 166 166