T6856 Make Project Images that match Typeahead choices

Summary: Ref T6856, Make matching Project picture to Project icon easy.

Test Plan: Edit Project, edit Project picture, click "Use Project Icon", Project picture should now match Project icon.

Reviewers: chad, #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: btrahan, Korvin, epriestley

Maniphest Tasks: T6856

Differential Revision: https://secure.phabricator.com/D11300
This commit is contained in:
lkassianik
2015-01-11 09:40:23 -08:00
committed by epriestley
parent 49ee09be3f
commit 9853ff2cff
3 changed files with 137 additions and 13 deletions

View File

@@ -236,6 +236,38 @@ final class PhabricatorProjectEditPictureController
->setLabel(pht('Quick Create'))
->setValue($compose_form));
$default_button = javelin_tag(
'button',
array(
'class' => 'grey',
),
pht('Use Project Icon'));
$default_input = javelin_tag(
'input',
array(
'type' => 'hidden',
'name' => 'projectPHID',
'value' => $project->getPHID(),
));
$default_form = phabricator_form(
$viewer,
array(
'class' => 'profile-image-form',
'method' => 'POST',
'action' => '/file/compose/',
),
array(
$default_input,
$default_button,
));
$form->appendChild(
id(new AphrontFormMarkupControl())
->setLabel(pht('Use Default'))
->setValue($default_form));
$upload_form = id(new AphrontFormView())
->setUser($viewer)
->setEncType('multipart/form-data')