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:
@@ -1140,7 +1140,7 @@ celerity_register_resource_map(array(
|
|||||||
),
|
),
|
||||||
'diffusion-source-css' =>
|
'diffusion-source-css' =>
|
||||||
array(
|
array(
|
||||||
'uri' => '/res/162c8794/rsrc/css/application/diffusion/diffusion-source.css',
|
'uri' => '/res/dcf60c4f/rsrc/css/application/diffusion/diffusion-source.css',
|
||||||
'type' => 'css',
|
'type' => 'css',
|
||||||
'requires' =>
|
'requires' =>
|
||||||
array(
|
array(
|
||||||
|
|||||||
@@ -110,6 +110,11 @@ final class PhabricatorConduitConsoleController
|
|||||||
->addCancelButton($this->getApplicationURI())
|
->addCancelButton($this->getApplicationURI())
|
||||||
->setValue('Call Method'));
|
->setValue('Call Method'));
|
||||||
|
|
||||||
|
$form_box = id(new PHUIFormBoxView())
|
||||||
|
->setHeaderText($method->getAPIMethodName())
|
||||||
|
->setFormError($status_view)
|
||||||
|
->setForm($form);
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
$crumbs->addCrumb(
|
$crumbs->addCrumb(
|
||||||
id(new PhabricatorCrumbView())
|
id(new PhabricatorCrumbView())
|
||||||
@@ -118,8 +123,7 @@ final class PhabricatorConduitConsoleController
|
|||||||
return $this->buildApplicationPage(
|
return $this->buildApplicationPage(
|
||||||
array(
|
array(
|
||||||
$crumbs,
|
$crumbs,
|
||||||
$status_view,
|
$form_box,
|
||||||
$form,
|
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'title' => $method->getAPIMethodName(),
|
'title' => $method->getAPIMethodName(),
|
||||||
|
|||||||
@@ -184,6 +184,11 @@ final class DifferentialRevisionEditController extends DifferentialController {
|
|||||||
$title = pht('Create New Differential Revision');
|
$title = pht('Create New Differential Revision');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$form_box = id(new PHUIFormBoxView())
|
||||||
|
->setHeaderText($title)
|
||||||
|
->setFormError($error_view)
|
||||||
|
->setForm($form);
|
||||||
|
|
||||||
$crumbs->addCrumb(
|
$crumbs->addCrumb(
|
||||||
id(new PhabricatorCrumbView())
|
id(new PhabricatorCrumbView())
|
||||||
->setName($title));
|
->setName($title));
|
||||||
@@ -191,8 +196,7 @@ final class DifferentialRevisionEditController extends DifferentialController {
|
|||||||
return $this->buildApplicationPage(
|
return $this->buildApplicationPage(
|
||||||
array(
|
array(
|
||||||
$crumbs,
|
$crumbs,
|
||||||
$error_view,
|
$form_box,
|
||||||
$form,
|
|
||||||
$preview),
|
$preview),
|
||||||
array(
|
array(
|
||||||
'title' => $title,
|
'title' => $title,
|
||||||
|
|||||||
@@ -610,6 +610,7 @@ final class DiffusionCommitController extends DiffusionController {
|
|||||||
|
|
||||||
$form = id(new AphrontFormView())
|
$form = id(new AphrontFormView())
|
||||||
->setUser($user)
|
->setUser($user)
|
||||||
|
->setShaded(true)
|
||||||
->setAction('/audit/addcomment/')
|
->setAction('/audit/addcomment/')
|
||||||
->addHiddenInput('commit', $commit->getPHID())
|
->addHiddenInput('commit', $commit->getPHID())
|
||||||
->appendChild(
|
->appendChild(
|
||||||
|
|||||||
@@ -81,13 +81,13 @@ final class DiffusionCommitEditController extends DiffusionController {
|
|||||||
->addCancelButton('/r'.$callsign.$commit->getCommitIdentifier());
|
->addCancelButton('/r'.$callsign.$commit->getCommitIdentifier());
|
||||||
$form->appendChild($submit);
|
$form->appendChild($submit);
|
||||||
|
|
||||||
$header = new PhabricatorHeaderView();
|
$form_box = id(new PHUIFormBoxView())
|
||||||
$header->setHeader(pht('Edit Diffusion Commit'));
|
->setHeaderText($page_title)
|
||||||
|
->setForm($form);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
return $this->buildApplicationPage(
|
||||||
array(
|
array(
|
||||||
$header,
|
$form_box,
|
||||||
$form,
|
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'title' => $page_title,
|
'title' => $page_title,
|
||||||
|
|||||||
@@ -260,8 +260,10 @@ final class PhabricatorPeopleProfilePictureController
|
|||||||
->setLabel(pht('Use Picture'))
|
->setLabel(pht('Use Picture'))
|
||||||
->setValue($buttons));
|
->setValue($buttons));
|
||||||
|
|
||||||
$upload_head = id(new PhabricatorHeaderView())
|
$form_box = id(new PHUIFormBoxView())
|
||||||
->setHeader(pht('Upload New Picture'));
|
->setHeaderText($title)
|
||||||
|
->setFormError($errors)
|
||||||
|
->setForm($form);
|
||||||
|
|
||||||
$upload_form = id(new AphrontFormView())
|
$upload_form = id(new AphrontFormView())
|
||||||
->setUser($user)
|
->setUser($user)
|
||||||
@@ -282,13 +284,20 @@ final class PhabricatorPeopleProfilePictureController
|
|||||||
$errors = id(new AphrontErrorView())->setErrors($errors);
|
$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(
|
return $this->buildApplicationPage(
|
||||||
array(
|
array(
|
||||||
$crumbs,
|
$crumbs,
|
||||||
$errors,
|
$form_box,
|
||||||
$form,
|
$upload_box,
|
||||||
$upload_head,
|
|
||||||
$upload_form,
|
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'title' => $title,
|
'title' => $title,
|
||||||
|
|||||||
@@ -37,9 +37,6 @@ final class PhamePostPublishController extends PhameController {
|
|||||||
return id(new AphrontRedirectResponse())->setURI($view_uri);
|
return id(new AphrontRedirectResponse())->setURI($view_uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
$header = id(new PhabricatorHeaderView())
|
|
||||||
->setHeader(pht('Preview Post'));
|
|
||||||
|
|
||||||
$form = id(new AphrontFormView())
|
$form = id(new AphrontFormView())
|
||||||
->setUser($user)
|
->setUser($user)
|
||||||
->appendChild(
|
->appendChild(
|
||||||
@@ -49,6 +46,10 @@ final class PhamePostPublishController extends PhameController {
|
|||||||
|
|
||||||
$frame = $this->renderPreviewFrame($post);
|
$frame = $this->renderPreviewFrame($post);
|
||||||
|
|
||||||
|
$form_box = id(new PHUIFormBoxView())
|
||||||
|
->setHeaderText(pht('Preview Post'))
|
||||||
|
->setForm($form);
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
$crumbs->addCrumb(
|
$crumbs->addCrumb(
|
||||||
id(new PhabricatorCrumbView())
|
id(new PhabricatorCrumbView())
|
||||||
@@ -59,8 +60,7 @@ final class PhamePostPublishController extends PhameController {
|
|||||||
$nav->appendChild(
|
$nav->appendChild(
|
||||||
array(
|
array(
|
||||||
$crumbs,
|
$crumbs,
|
||||||
$header,
|
$form_box,
|
||||||
$form,
|
|
||||||
$frame,
|
$frame,
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|||||||
@@ -108,6 +108,11 @@ final class ReleephProjectCreateController extends ReleephProjectController {
|
|||||||
->addCancelButton('/releeph/project/')
|
->addCancelButton('/releeph/project/')
|
||||||
->setValue(pht('Create')));
|
->setValue(pht('Create')));
|
||||||
|
|
||||||
|
$form_box = id(new PHUIFormBoxView())
|
||||||
|
->setHeaderText(pht('Create New Project'))
|
||||||
|
->setFormError($error_view)
|
||||||
|
->setForm($form);
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
$crumbs->addCrumb(
|
$crumbs->addCrumb(
|
||||||
id(new PhabricatorCrumbView())
|
id(new PhabricatorCrumbView())
|
||||||
@@ -116,8 +121,7 @@ final class ReleephProjectCreateController extends ReleephProjectController {
|
|||||||
return $this->buildApplicationPage(
|
return $this->buildApplicationPage(
|
||||||
array(
|
array(
|
||||||
$crumbs,
|
$crumbs,
|
||||||
$error_view,
|
$form_box,
|
||||||
$form,
|
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'title' => pht('Create New Project'),
|
'title' => pht('Create New Project'),
|
||||||
|
|||||||
@@ -674,13 +674,13 @@ final class PhabricatorRepositoryEditController
|
|||||||
id(new AphrontFormSubmitControl())
|
id(new AphrontFormSubmitControl())
|
||||||
->setValue('Save Configuration'));
|
->setValue('Save Configuration'));
|
||||||
|
|
||||||
$header = id(new PhabricatorHeaderView())
|
$form_box = id(new PHUIFormBoxView())
|
||||||
->setHeader(pht('Edit Repository Tracking'));
|
->setHeaderText(pht('Edit Repository Tracking'))
|
||||||
|
->setFormError($error_view)
|
||||||
|
->setForm($form);
|
||||||
|
|
||||||
$nav = $this->sideNav;
|
$nav = $this->sideNav;
|
||||||
$nav->appendChild($error_view);
|
$nav->appendChild($form_box);
|
||||||
$nav->appendChild($header);
|
|
||||||
$nav->appendChild($form);
|
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
return $this->buildApplicationPage(
|
||||||
$nav,
|
$nav,
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ final class PHUIFormBoxView extends AphrontView {
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setForm(AphrontFormView $form) {
|
public function setForm($form) {
|
||||||
$this->form = $form;
|
$this->form = $form;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
font-family: "Monaco", Consolas, monospace;
|
font-family: "Monaco", Consolas, monospace;
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.diffusion-source tr.phabricator-source-highlight {
|
.diffusion-source tr.phabricator-source-highlight {
|
||||||
|
|||||||
Reference in New Issue
Block a user