Commit 04f8270a authored by epriestley's avatar epriestley
Browse files

Remove some unusual UI policy hints in Phriction

Summary:
Ref T13077. We currently have these weird policy hints in Phriction that we don't use in other applications. Just remove them for consistency to make the eventual swap to EditEngine a little easier.

Also nuke some unreacahble code.

Test Plan: Loaded edit page, saw more standard UI.

Reviewers: amckinley

Maniphest Tasks: T13077

Differential Revision: https://secure.phabricator.com/D19618
parent 4afb6446
......@@ -226,13 +226,7 @@ final class PhrictionEditController
->execute();
$view_capability = PhabricatorPolicyCapability::CAN_VIEW;
$edit_capability = PhabricatorPolicyCapability::CAN_EDIT;
$codex = id(PhabricatorPolicyCodex::newFromObject($document, $viewer))
->setCapability($view_capability);
$view_capability_description = $codex->getPolicySpecialRuleForCapability(
PhabricatorPolicyCapability::CAN_VIEW)->getDescription();
$edit_capability_description = $codex->getPolicySpecialRuleForCapability(
PhabricatorPolicyCapability::CAN_EDIT)->getDescription();
$form = id(new AphrontFormView())
->setUser($viewer)
......@@ -279,15 +273,13 @@ final class PhrictionEditController
->setSpacePHID($v_space)
->setPolicyObject($document)
->setCapability($view_capability)
->setPolicies($policies)
->setCaption($view_capability_description))
->setPolicies($policies))
->appendChild(
id(new AphrontFormPolicyControl())
->setName('editPolicy')
->setPolicyObject($document)
->setCapability($edit_capability)
->setPolicies($policies)
->setCaption($edit_capability_description))
->setPolicies($policies))
->appendChild(
id(new AphrontFormTextControl())
->setLabel(pht('Edit Notes'))
......@@ -323,17 +315,17 @@ final class PhrictionEditController
$crumbs->setBorder(true);
$view = id(new PHUITwoColumnView())
->setFooter(array(
$draft_note,
$form_box,
$preview,
));
->setFooter(
array(
$draft_note,
$form_box,
$preview,
));
return $this->newPage()
->setTitle($page_title)
->setCrumbs($crumbs)
->appendChild($view);
}
}
......@@ -279,7 +279,6 @@ final class AphrontFormPolicyControl extends AphrontFormControl {
->setIcon($icon);
}
if ($this->templatePHIDType) {
$context_path = 'template/'.$this->templatePHIDType.'/';
} else {
......@@ -346,15 +345,6 @@ final class AphrontFormPolicyControl extends AphrontFormControl {
)),
$input,
));
return AphrontFormSelectControl::renderSelectTag(
$this->getValue(),
$this->getOptions(),
array(
'name' => $this->getName(),
'disabled' => $this->getDisabled() ? 'disabled' : null,
'id' => $this->getID(),
));
}
public static function getSelectCustomKey() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment