mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-27 01:02:42 +01:00
Update forms to use PHUIFormBoxView
Summary: Some more callsites, let me know if you see others, I think think is 98% of them now. Test Plan: tested each page Reviewers: epriestley, btrahan Reviewed By: btrahan CC: Korvin, aran Differential Revision: https://secure.phabricator.com/D6814
This commit is contained in:
parent
fe2a96e37f
commit
bb9be01d55
11 changed files with 51 additions and 28 deletions
|
@ -1140,7 +1140,7 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'diffusion-source-css' =>
|
||||
array(
|
||||
'uri' => '/res/162c8794/rsrc/css/application/diffusion/diffusion-source.css',
|
||||
'uri' => '/res/dcf60c4f/rsrc/css/application/diffusion/diffusion-source.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
|
|
|
@ -110,6 +110,11 @@ final class PhabricatorConduitConsoleController
|
|||
->addCancelButton($this->getApplicationURI())
|
||||
->setValue('Call Method'));
|
||||
|
||||
$form_box = id(new PHUIFormBoxView())
|
||||
->setHeaderText($method->getAPIMethodName())
|
||||
->setFormError($status_view)
|
||||
->setForm($form);
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
$crumbs->addCrumb(
|
||||
id(new PhabricatorCrumbView())
|
||||
|
@ -118,8 +123,7 @@ final class PhabricatorConduitConsoleController
|
|||
return $this->buildApplicationPage(
|
||||
array(
|
||||
$crumbs,
|
||||
$status_view,
|
||||
$form,
|
||||
$form_box,
|
||||
),
|
||||
array(
|
||||
'title' => $method->getAPIMethodName(),
|
||||
|
|
|
@ -184,6 +184,11 @@ final class DifferentialRevisionEditController extends DifferentialController {
|
|||
$title = pht('Create New Differential Revision');
|
||||
}
|
||||
|
||||
$form_box = id(new PHUIFormBoxView())
|
||||
->setHeaderText($title)
|
||||
->setFormError($error_view)
|
||||
->setForm($form);
|
||||
|
||||
$crumbs->addCrumb(
|
||||
id(new PhabricatorCrumbView())
|
||||
->setName($title));
|
||||
|
@ -191,8 +196,7 @@ final class DifferentialRevisionEditController extends DifferentialController {
|
|||
return $this->buildApplicationPage(
|
||||
array(
|
||||
$crumbs,
|
||||
$error_view,
|
||||
$form,
|
||||
$form_box,
|
||||
$preview),
|
||||
array(
|
||||
'title' => $title,
|
||||
|
|
|
@ -610,6 +610,7 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
|
||||
$form = id(new AphrontFormView())
|
||||
->setUser($user)
|
||||
->setShaded(true)
|
||||
->setAction('/audit/addcomment/')
|
||||
->addHiddenInput('commit', $commit->getPHID())
|
||||
->appendChild(
|
||||
|
|
|
@ -81,13 +81,13 @@ final class DiffusionCommitEditController extends DiffusionController {
|
|||
->addCancelButton('/r'.$callsign.$commit->getCommitIdentifier());
|
||||
$form->appendChild($submit);
|
||||
|
||||
$header = new PhabricatorHeaderView();
|
||||
$header->setHeader(pht('Edit Diffusion Commit'));
|
||||
$form_box = id(new PHUIFormBoxView())
|
||||
->setHeaderText($page_title)
|
||||
->setForm($form);
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
array(
|
||||
$header,
|
||||
$form,
|
||||
$form_box,
|
||||
),
|
||||
array(
|
||||
'title' => $page_title,
|
||||
|
|
|
@ -260,8 +260,10 @@ final class PhabricatorPeopleProfilePictureController
|
|||
->setLabel(pht('Use Picture'))
|
||||
->setValue($buttons));
|
||||
|
||||
$upload_head = id(new PhabricatorHeaderView())
|
||||
->setHeader(pht('Upload New Picture'));
|
||||
$form_box = id(new PHUIFormBoxView())
|
||||
->setHeaderText($title)
|
||||
->setFormError($errors)
|
||||
->setForm($form);
|
||||
|
||||
$upload_form = id(new AphrontFormView())
|
||||
->setUser($user)
|
||||
|
@ -282,13 +284,20 @@ final class PhabricatorPeopleProfilePictureController
|
|||
$errors = id(new AphrontErrorView())->setErrors($errors);
|
||||
}
|
||||
|
||||
$form_box = id(new PHUIFormBoxView())
|
||||
->setHeaderText($title)
|
||||
->setFormError($errors)
|
||||
->setForm($form);
|
||||
|
||||
$upload_box = id(new PHUIFormBoxView())
|
||||
->setHeaderText(pht('Upload New Picture'))
|
||||
->setForm($upload_form);
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
array(
|
||||
$crumbs,
|
||||
$errors,
|
||||
$form,
|
||||
$upload_head,
|
||||
$upload_form,
|
||||
$form_box,
|
||||
$upload_box,
|
||||
),
|
||||
array(
|
||||
'title' => $title,
|
||||
|
|
|
@ -37,9 +37,6 @@ final class PhamePostPublishController extends PhameController {
|
|||
return id(new AphrontRedirectResponse())->setURI($view_uri);
|
||||
}
|
||||
|
||||
$header = id(new PhabricatorHeaderView())
|
||||
->setHeader(pht('Preview Post'));
|
||||
|
||||
$form = id(new AphrontFormView())
|
||||
->setUser($user)
|
||||
->appendChild(
|
||||
|
@ -49,6 +46,10 @@ final class PhamePostPublishController extends PhameController {
|
|||
|
||||
$frame = $this->renderPreviewFrame($post);
|
||||
|
||||
$form_box = id(new PHUIFormBoxView())
|
||||
->setHeaderText(pht('Preview Post'))
|
||||
->setForm($form);
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
$crumbs->addCrumb(
|
||||
id(new PhabricatorCrumbView())
|
||||
|
@ -59,8 +60,7 @@ final class PhamePostPublishController extends PhameController {
|
|||
$nav->appendChild(
|
||||
array(
|
||||
$crumbs,
|
||||
$header,
|
||||
$form,
|
||||
$form_box,
|
||||
$frame,
|
||||
));
|
||||
|
||||
|
|
|
@ -108,6 +108,11 @@ final class ReleephProjectCreateController extends ReleephProjectController {
|
|||
->addCancelButton('/releeph/project/')
|
||||
->setValue(pht('Create')));
|
||||
|
||||
$form_box = id(new PHUIFormBoxView())
|
||||
->setHeaderText(pht('Create New Project'))
|
||||
->setFormError($error_view)
|
||||
->setForm($form);
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
$crumbs->addCrumb(
|
||||
id(new PhabricatorCrumbView())
|
||||
|
@ -116,8 +121,7 @@ final class ReleephProjectCreateController extends ReleephProjectController {
|
|||
return $this->buildApplicationPage(
|
||||
array(
|
||||
$crumbs,
|
||||
$error_view,
|
||||
$form,
|
||||
$form_box,
|
||||
),
|
||||
array(
|
||||
'title' => pht('Create New Project'),
|
||||
|
|
|
@ -674,13 +674,13 @@ final class PhabricatorRepositoryEditController
|
|||
id(new AphrontFormSubmitControl())
|
||||
->setValue('Save Configuration'));
|
||||
|
||||
$header = id(new PhabricatorHeaderView())
|
||||
->setHeader(pht('Edit Repository Tracking'));
|
||||
$form_box = id(new PHUIFormBoxView())
|
||||
->setHeaderText(pht('Edit Repository Tracking'))
|
||||
->setFormError($error_view)
|
||||
->setForm($form);
|
||||
|
||||
$nav = $this->sideNav;
|
||||
$nav->appendChild($error_view);
|
||||
$nav->appendChild($header);
|
||||
$nav->appendChild($form);
|
||||
$nav->appendChild($form_box);
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
$nav,
|
||||
|
|
|
@ -16,7 +16,7 @@ final class PHUIFormBoxView extends AphrontView {
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function setForm(AphrontFormView $form) {
|
||||
public function setForm($form) {
|
||||
$this->form = $form;
|
||||
return $this;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
width: 100%;
|
||||
font-family: "Monaco", Consolas, monospace;
|
||||
font-size: 10px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.diffusion-source tr.phabricator-source-highlight {
|
||||
|
|
Loading…
Reference in a new issue