mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 14:00:56 +01:00
Make fork more prominent in edit cases
Summary: since you can't edit text the correct move is to fork. Make that abundantly clear. Test Plan: it was clear to me Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T1826 Differential Revision: https://secure.phabricator.com/D3593
This commit is contained in:
parent
e5e3617e46
commit
f182d735e9
1 changed files with 16 additions and 0 deletions
|
@ -167,6 +167,22 @@ final class PhabricatorPasteEditController extends PhabricatorPasteController {
|
|||
->setHeight(AphrontFormTextAreaControl::HEIGHT_VERY_TALL)
|
||||
->setCustomClass('PhabricatorMonospaced')
|
||||
->setName('text'));
|
||||
} else {
|
||||
$fork_link = phutil_render_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $this->getApplicationURI('?parent='.$paste->getID())
|
||||
),
|
||||
'Fork'
|
||||
);
|
||||
$form
|
||||
->appendChild(
|
||||
id(new AphrontFormMarkupControl())
|
||||
->setLabel('Text')
|
||||
->setValue(
|
||||
'Paste text can not be edited. '.
|
||||
$fork_link.' to create a new paste.'
|
||||
));
|
||||
}
|
||||
|
||||
$submit = new AphrontFormSubmitControl();
|
||||
|
|
Loading…
Reference in a new issue