mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-24 14:30:56 +01:00
Don't render the Maniphest edit form bottom-of-page preview panel if "Description" is locked or hidden
Summary: See <https://discourse.phabricator-community.org/t/hidden-description-field-in-maniphest-task-breaks-form/1432>. If you hide the "Description" field in Maniphest, we still try to render a remarkup preview for it. This causes a JS error and a nonfunctional element on the page. Instead, hide the preview panel if the field has been locked or hidden. Test Plan: - Hid the field, loaded the form, no more preview panel / JS error. - Used a normal form with the field visible, saw a normal preview. Reviewers: amckinley Reviewed By: amckinley Differential Revision: https://secure.phabricator.com/D19432
This commit is contained in:
parent
a4a22dd2f8
commit
fddb506e98
1 changed files with 8 additions and 0 deletions
|
@ -302,6 +302,14 @@ abstract class PhabricatorEditField extends Phobject {
|
|||
}
|
||||
|
||||
public function getPreviewPanel() {
|
||||
if ($this->getIsHidden()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if ($this->getIsLocked()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $this->previewPanel;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue