1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +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:
Bob Trahan 2012-10-01 16:49:27 -07:00
parent e5e3617e46
commit f182d735e9

View file

@ -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();