Added instructions to patch submission form.
This commit is contained in:
@@ -53,19 +53,27 @@ final class DifferentialDiffCreateController extends DifferentialController {
|
||||
|
||||
$cancel_uri = $this->getApplicationURI();
|
||||
|
||||
$form
|
||||
->setAction('/differential/diff/create/')
|
||||
->setEncType('multipart/form-data')
|
||||
->setUser($request->getUser())
|
||||
->appendInstructions(
|
||||
pht(
|
||||
if (PhabricatorEnv::getEnvConfig('patch_guidelines.file') !== null) {
|
||||
$webroot = dirname(phutil_get_library_root('phabricator')).'/webroot/';
|
||||
$instructions = phutil_safe_html(
|
||||
FileSystem::readFile($webroot .
|
||||
PhabricatorEnv::getEnvConfig('patch_guidelines.file')));
|
||||
} else {
|
||||
$innstructions = pht(
|
||||
'The best way to create a Differential diff is by using %s, but you '.
|
||||
'can also just paste a diff (for example, from %s, %s or %s) into '.
|
||||
'this box, or upload a diff file.',
|
||||
$arcanist_link,
|
||||
phutil_tag('tt', array(), 'svn diff'),
|
||||
phutil_tag('tt', array(), 'git diff'),
|
||||
phutil_tag('tt', array(), 'hg diff')))
|
||||
phutil_tag('tt', array(), 'hg diff'));
|
||||
}
|
||||
|
||||
$form
|
||||
->setAction('/differential/diff/create/')
|
||||
->setEncType('multipart/form-data')
|
||||
->setUser($request->getUser())
|
||||
->appendInstructions($instructions)
|
||||
->appendChild(
|
||||
id(new AphrontFormTextAreaControl())
|
||||
->setLabel(pht('Raw Diff'))
|
||||
|
||||
Reference in New Issue
Block a user