1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 14:52:41 +01:00

Update Form Layouts

Summary:
This attempts some consistency in form layouts. Notably, they all now contain headers and are 16px off the sides and tops of pages. Also updated dialogs to the same look and feel. I think I got 98% of forms with this pass, but it's likely I missed some buried somewhere.

TODO: will take another pass as consolidating these colors and new gradients in another diff.

Test Plan: Played in my sandbox all week. Please play with it too and let me know how they feel.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D6806
This commit is contained in:
Chad Little 2013-08-26 11:53:11 -07:00
parent 320498d3d0
commit fe2a96e37f
117 changed files with 633 additions and 589 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 B

View file

@ -31,6 +31,11 @@
"rule" : ".gradient-grey-header",
"hash" : "1c8f8d61984e3fc5a7e528b9bd4d484a"
},
"gradient-lightblue-header" : {
"name" : "gradient-lightblue-header",
"rule" : ".gradient-lightblue-header",
"hash" : "b838d2eb15f9b620e82b4da240bf464a"
},
"gradient-menu-label" : {
"name" : "gradient-menu-label",
"rule" : ".gradient-menu-label, .phabricator-side-menu .phui-list-item-type-label",

View file

@ -70,7 +70,7 @@ $package_spec = array(
'phui-button-css',
'phabricator-standard-page-view',
'aphront-dialog-view-css',
'aphront-form-view-css',
'phui-form-view-css',
'aphront-panel-view-css',
'aphront-table-view-css',
'aphront-tokenizer-control-css',
@ -97,7 +97,6 @@ $package_spec = array(
'phabricator-notification-menu-css',
'lightbox-attachment-css',
'phabricator-header-view-css',
'phabricator-form-view-css',
'phabricator-filetree-view-css',
'phabricator-nav-view-css',
'phabricator-side-menu-view-css',

View file

@ -632,8 +632,8 @@ celerity_register_resource_map(array(
),
'/rsrc/image/sprite-gradient.png' =>
array(
'hash' => 'a49d2e493dba4bea85bb202af528106a',
'uri' => '/res/a49d2e49/rsrc/image/sprite-gradient.png',
'hash' => 'c6c42387e625948e683d9d8c62ea1b7f',
'uri' => '/res/c6c42387/rsrc/image/sprite-gradient.png',
'disk' => '/rsrc/image/sprite-gradient.png',
'type' => 'png',
),
@ -836,7 +836,7 @@ celerity_register_resource_map(array(
),
'aphront-dialog-view-css' =>
array(
'uri' => '/res/29a054fd/rsrc/css/aphront/dialog-view.css',
'uri' => '/res/c7a7e179/rsrc/css/aphront/dialog-view.css',
'type' => 'css',
'requires' =>
array(
@ -845,25 +845,16 @@ celerity_register_resource_map(array(
),
'aphront-error-view-css' =>
array(
'uri' => '/res/e2bb50c4/rsrc/css/aphront/error-view.css',
'uri' => '/res/4ba306a0/rsrc/css/aphront/error-view.css',
'type' => 'css',
'requires' =>
array(
),
'disk' => '/rsrc/css/aphront/error-view.css',
),
'aphront-form-view-css' =>
array(
'uri' => '/res/1be2545a/rsrc/css/aphront/form-view.css',
'type' => 'css',
'requires' =>
array(
),
'disk' => '/rsrc/css/aphront/form-view.css',
),
'aphront-list-filter-view-css' =>
array(
'uri' => '/res/a90a0c94/rsrc/css/aphront/list-filter-view.css',
'uri' => '/res/9fd0aae6/rsrc/css/aphront/list-filter-view.css',
'type' => 'css',
'requires' =>
array(
@ -899,7 +890,7 @@ celerity_register_resource_map(array(
),
'aphront-panel-view-css' =>
array(
'uri' => '/res/f55024c3/rsrc/css/aphront/panel-view.css',
'uri' => '/res/e19deae5/rsrc/css/aphront/panel-view.css',
'type' => 'css',
'requires' =>
array(
@ -990,7 +981,7 @@ celerity_register_resource_map(array(
),
'conpherence-message-pane-css' =>
array(
'uri' => '/res/80cde760/rsrc/css/application/conpherence/message-pane.css',
'uri' => '/res/4f3bfae5/rsrc/css/application/conpherence/message-pane.css',
'type' => 'css',
'requires' =>
array(
@ -2178,7 +2169,7 @@ celerity_register_resource_map(array(
),
'javelin-behavior-phabricator-transaction-list' =>
array(
'uri' => '/res/db441ac4/rsrc/js/application/transactions/behavior-transaction-list.js',
'uri' => '/res/f05b3c6b/rsrc/js/application/transactions/behavior-transaction-list.js',
'type' => 'js',
'requires' =>
array(
@ -3063,7 +3054,7 @@ celerity_register_resource_map(array(
),
'phabricator-core-css' =>
array(
'uri' => '/res/bb4b77f3/rsrc/css/core/core.css',
'uri' => '/res/9e767fb1/rsrc/css/core/core.css',
'type' => 'css',
'requires' =>
array(
@ -3181,15 +3172,6 @@ celerity_register_resource_map(array(
),
'disk' => '/rsrc/css/application/flag/flag.css',
),
'phabricator-form-view-css' =>
array(
'uri' => '/res/ba05f8ba/rsrc/css/layout/phabricator-form-view.css',
'type' => 'css',
'requires' =>
array(
),
'disk' => '/rsrc/css/layout/phabricator-form-view.css',
),
'phabricator-header-view-css' =>
array(
'uri' => '/res/da35cfa0/rsrc/css/layout/phabricator-header-view.css',
@ -3404,7 +3386,7 @@ celerity_register_resource_map(array(
),
'phabricator-remarkup-css' =>
array(
'uri' => '/res/8531b6a1/rsrc/css/core/remarkup.css',
'uri' => '/res/d0af3cab/rsrc/css/core/remarkup.css',
'type' => 'css',
'requires' =>
array(
@ -3443,7 +3425,7 @@ celerity_register_resource_map(array(
),
'phabricator-side-menu-view-css' =>
array(
'uri' => '/res/f43a8365/rsrc/css/layout/phabricator-side-menu-view.css',
'uri' => '/res/e83fbe58/rsrc/css/layout/phabricator-side-menu-view.css',
'type' => 'css',
'requires' =>
array(
@ -3766,7 +3748,7 @@ celerity_register_resource_map(array(
),
'phui-box-css' =>
array(
'uri' => '/res/1b741073/rsrc/css/phui/phui-box.css',
'uri' => '/res/8244305c/rsrc/css/phui/phui-box.css',
'type' => 'css',
'requires' =>
array(
@ -3802,13 +3784,22 @@ celerity_register_resource_map(array(
),
'phui-form-css' =>
array(
'uri' => '/res/c02b6db7/rsrc/css/phui/phui-form.css',
'uri' => '/res/8f33e95f/rsrc/css/phui/phui-form.css',
'type' => 'css',
'requires' =>
array(
),
'disk' => '/rsrc/css/phui/phui-form.css',
),
'phui-form-view-css' =>
array(
'uri' => '/res/52025834/rsrc/css/phui/phui-form-view.css',
'type' => 'css',
'requires' =>
array(
),
'disk' => '/rsrc/css/phui/phui-form-view.css',
),
'phui-icon-view-css' =>
array(
'uri' => '/res/f78f4c64/rsrc/css/phui/phui-icon.css',
@ -3838,7 +3829,7 @@ celerity_register_resource_map(array(
),
'phui-remarkup-preview-css' =>
array(
'uri' => '/res/4535e062/rsrc/css/phui/phui-remarkup-preview.css',
'uri' => '/res/3cba9fbc/rsrc/css/phui/phui-remarkup-preview.css',
'type' => 'css',
'requires' =>
array(
@ -4081,7 +4072,7 @@ celerity_register_resource_map(array(
),
'sprite-gradient-css' =>
array(
'uri' => '/res/af8d50a1/rsrc/css/sprite-gradient.css',
'uri' => '/res/08c64fb3/rsrc/css/sprite-gradient.css',
'type' => 'css',
'requires' =>
array(
@ -4172,7 +4163,7 @@ celerity_register_resource_map(array(
), array(
'packages' =>
array(
'4a060444' =>
'4c072d06' =>
array(
'name' => 'core.pkg.css',
'symbols' =>
@ -4182,7 +4173,7 @@ celerity_register_resource_map(array(
2 => 'phui-button-css',
3 => 'phabricator-standard-page-view',
4 => 'aphront-dialog-view-css',
5 => 'aphront-form-view-css',
5 => 'phui-form-view-css',
6 => 'aphront-panel-view-css',
7 => 'aphront-table-view-css',
8 => 'aphront-tokenizer-control-css',
@ -4205,22 +4196,21 @@ celerity_register_resource_map(array(
25 => 'phabricator-notification-menu-css',
26 => 'lightbox-attachment-css',
27 => 'phabricator-header-view-css',
28 => 'phabricator-form-view-css',
29 => 'phabricator-filetree-view-css',
30 => 'phabricator-nav-view-css',
31 => 'phabricator-side-menu-view-css',
32 => 'phabricator-crumbs-view-css',
33 => 'phabricator-object-item-list-view-css',
34 => 'global-drag-and-drop-css',
35 => 'phui-spacing-css',
36 => 'phui-form-css',
37 => 'phui-icon-view-css',
38 => 'phabricator-application-launch-view-css',
39 => 'phabricator-action-list-view-css',
40 => 'phabricator-property-list-view-css',
41 => 'phabricator-tag-view-css',
28 => 'phabricator-filetree-view-css',
29 => 'phabricator-nav-view-css',
30 => 'phabricator-side-menu-view-css',
31 => 'phabricator-crumbs-view-css',
32 => 'phabricator-object-item-list-view-css',
33 => 'global-drag-and-drop-css',
34 => 'phui-spacing-css',
35 => 'phui-form-css',
36 => 'phui-icon-view-css',
37 => 'phabricator-application-launch-view-css',
38 => 'phabricator-action-list-view-css',
39 => 'phabricator-property-list-view-css',
40 => 'phabricator-tag-view-css',
),
'uri' => '/res/pkg/4a060444/core.pkg.css',
'uri' => '/res/pkg/4c072d06/core.pkg.css',
'type' => 'css',
),
'4f81c788' =>
@ -4411,16 +4401,15 @@ celerity_register_resource_map(array(
),
'reverse' =>
array(
'aphront-dialog-view-css' => '4a060444',
'aphront-error-view-css' => '4a060444',
'aphront-form-view-css' => '4a060444',
'aphront-list-filter-view-css' => '4a060444',
'aphront-pager-view-css' => '4a060444',
'aphront-panel-view-css' => '4a060444',
'aphront-table-view-css' => '4a060444',
'aphront-tokenizer-control-css' => '4a060444',
'aphront-tooltip-css' => '4a060444',
'aphront-typeahead-control-css' => '4a060444',
'aphront-dialog-view-css' => '4c072d06',
'aphront-error-view-css' => '4c072d06',
'aphront-list-filter-view-css' => '4c072d06',
'aphront-pager-view-css' => '4c072d06',
'aphront-panel-view-css' => '4c072d06',
'aphront-table-view-css' => '4c072d06',
'aphront-tokenizer-control-css' => '4c072d06',
'aphront-tooltip-css' => '4c072d06',
'aphront-typeahead-control-css' => '4c072d06',
'differential-changeset-view-css' => '09216861',
'differential-core-view-css' => '09216861',
'differential-inline-comment-editor' => 'd07a3bc2',
@ -4434,7 +4423,7 @@ celerity_register_resource_map(array(
'differential-table-of-contents-css' => '09216861',
'diffusion-commit-view-css' => 'c8ce2d88',
'diffusion-icons-css' => 'c8ce2d88',
'global-drag-and-drop-css' => '4a060444',
'global-drag-and-drop-css' => '4c072d06',
'inline-comment-summary-css' => '09216861',
'javelin-aphlict' => '4f81c788',
'javelin-behavior' => '2dbbb7d1',
@ -4507,55 +4496,55 @@ celerity_register_resource_map(array(
'javelin-util' => '2dbbb7d1',
'javelin-vector' => '2dbbb7d1',
'javelin-workflow' => '2dbbb7d1',
'lightbox-attachment-css' => '4a060444',
'lightbox-attachment-css' => '4c072d06',
'maniphest-task-summary-css' => '06bacb9a',
'maniphest-transaction-detail-css' => '06bacb9a',
'phabricator-action-list-view-css' => '4a060444',
'phabricator-application-launch-view-css' => '4a060444',
'phabricator-action-list-view-css' => '4c072d06',
'phabricator-application-launch-view-css' => '4c072d06',
'phabricator-busy' => '4f81c788',
'phabricator-content-source-view-css' => '09216861',
'phabricator-core-css' => '4a060444',
'phabricator-crumbs-view-css' => '4a060444',
'phabricator-core-css' => '4c072d06',
'phabricator-crumbs-view-css' => '4c072d06',
'phabricator-drag-and-drop-file-upload' => 'd07a3bc2',
'phabricator-dropdown-menu' => '4f81c788',
'phabricator-file-upload' => '4f81c788',
'phabricator-filetree-view-css' => '4a060444',
'phabricator-flag-css' => '4a060444',
'phabricator-form-view-css' => '4a060444',
'phabricator-header-view-css' => '4a060444',
'phabricator-filetree-view-css' => '4c072d06',
'phabricator-flag-css' => '4c072d06',
'phabricator-header-view-css' => '4c072d06',
'phabricator-hovercard' => '4f81c788',
'phabricator-jump-nav' => '4a060444',
'phabricator-jump-nav' => '4c072d06',
'phabricator-keyboard-shortcut' => '4f81c788',
'phabricator-keyboard-shortcut-manager' => '4f81c788',
'phabricator-main-menu-view' => '4a060444',
'phabricator-main-menu-view' => '4c072d06',
'phabricator-menu-item' => '4f81c788',
'phabricator-nav-view-css' => '4a060444',
'phabricator-nav-view-css' => '4c072d06',
'phabricator-notification' => '4f81c788',
'phabricator-notification-css' => '4a060444',
'phabricator-notification-menu-css' => '4a060444',
'phabricator-object-item-list-view-css' => '4a060444',
'phabricator-notification-css' => '4c072d06',
'phabricator-notification-menu-css' => '4c072d06',
'phabricator-object-item-list-view-css' => '4c072d06',
'phabricator-object-selector-css' => '09216861',
'phabricator-phtize' => '4f81c788',
'phabricator-prefab' => '4f81c788',
'phabricator-project-tag-css' => '06bacb9a',
'phabricator-property-list-view-css' => '4a060444',
'phabricator-remarkup-css' => '4a060444',
'phabricator-property-list-view-css' => '4c072d06',
'phabricator-remarkup-css' => '4c072d06',
'phabricator-shaped-request' => 'd07a3bc2',
'phabricator-side-menu-view-css' => '4a060444',
'phabricator-standard-page-view' => '4a060444',
'phabricator-tag-view-css' => '4a060444',
'phabricator-side-menu-view-css' => '4c072d06',
'phabricator-standard-page-view' => '4c072d06',
'phabricator-tag-view-css' => '4c072d06',
'phabricator-textareautils' => '4f81c788',
'phabricator-tooltip' => '4f81c788',
'phabricator-transaction-view-css' => '4a060444',
'phabricator-zindex-css' => '4a060444',
'phui-button-css' => '4a060444',
'phui-form-css' => '4a060444',
'phui-icon-view-css' => '4a060444',
'phui-spacing-css' => '4a060444',
'sprite-apps-large-css' => '4a060444',
'sprite-gradient-css' => '4a060444',
'sprite-icons-css' => '4a060444',
'sprite-menu-css' => '4a060444',
'syntax-highlighting-css' => '4a060444',
'phabricator-transaction-view-css' => '4c072d06',
'phabricator-zindex-css' => '4c072d06',
'phui-button-css' => '4c072d06',
'phui-form-css' => '4c072d06',
'phui-form-view-css' => '4c072d06',
'phui-icon-view-css' => '4c072d06',
'phui-spacing-css' => '4c072d06',
'sprite-apps-large-css' => '4c072d06',
'sprite-gradient-css' => '4c072d06',
'sprite-icons-css' => '4c072d06',
'sprite-menu-css' => '4c072d06',
'syntax-highlighting-css' => '4c072d06',
),
));

View file

@ -38,7 +38,6 @@ phutil_register_library_map(array(
'AphrontFormFileControl' => 'view/form/control/AphrontFormFileControl.php',
'AphrontFormImageControl' => 'view/form/control/AphrontFormImageControl.php',
'AphrontFormInsetView' => 'view/form/AphrontFormInsetView.php',
'AphrontFormLayoutView' => 'view/form/AphrontFormLayoutView.php',
'AphrontFormMarkupControl' => 'view/form/control/AphrontFormMarkupControl.php',
'AphrontFormPasswordControl' => 'view/form/control/AphrontFormPasswordControl.php',
'AphrontFormPolicyControl' => 'view/form/control/AphrontFormPolicyControl.php',
@ -737,8 +736,10 @@ phutil_register_library_map(array(
'PHUIDocumentView' => 'view/phui/PHUIDocumentView.php',
'PHUIFeedStoryExample' => 'applications/uiexample/examples/PHUIFeedStoryExample.php',
'PHUIFeedStoryView' => 'view/phui/PHUIFeedStoryView.php',
'PHUIFormBoxView' => 'view/form/PHUIFormBoxView.php',
'PHUIFormDividerControl' => 'view/form/control/PHUIFormDividerControl.php',
'PHUIFormFreeformDateControl' => 'view/form/control/PHUIFormFreeformDateControl.php',
'PHUIFormLayoutView' => 'view/form/PHUIFormLayoutView.php',
'PHUIFormMultiSubmitControl' => 'view/form/control/PHUIFormMultiSubmitControl.php',
'PHUIFormPageView' => 'view/form/PHUIFormPageView.php',
'PHUIIconExample' => 'applications/uiexample/examples/PHUIIconExample.php',
@ -2069,7 +2070,6 @@ phutil_register_library_map(array(
'AphrontFormFileControl' => 'AphrontFormControl',
'AphrontFormImageControl' => 'AphrontFormControl',
'AphrontFormInsetView' => 'AphrontView',
'AphrontFormLayoutView' => 'AphrontView',
'AphrontFormMarkupControl' => 'AphrontFormControl',
'AphrontFormPasswordControl' => 'AphrontFormControl',
'AphrontFormPolicyControl' => 'AphrontFormControl',
@ -2774,8 +2774,10 @@ phutil_register_library_map(array(
'PHUIDocumentView' => 'AphrontTagView',
'PHUIFeedStoryExample' => 'PhabricatorUIExample',
'PHUIFeedStoryView' => 'AphrontView',
'PHUIFormBoxView' => 'AphrontView',
'PHUIFormDividerControl' => 'AphrontFormControl',
'PHUIFormFreeformDateControl' => 'AphrontFormControl',
'PHUIFormLayoutView' => 'AphrontView',
'PHUIFormMultiSubmitControl' => 'AphrontFormControl',
'PHUIFormPageView' => 'AphrontView',
'PHUIIconExample' => 'PhabricatorUIExample',

View file

@ -87,7 +87,6 @@ final class PhabricatorAuditListController extends PhabricatorAuditController {
$form = new AphrontFormView();
$form->setUser($user);
$form->setNoShading(true);
$show_status = false;
$show_user = false;

View file

@ -49,7 +49,7 @@ final class PhabricatorAuthConfirmLinkController
->addCancelButton($panel_uri)
->addSubmitButton(pht('Confirm Account Link'));
$form = id(new AphrontFormLayoutView())
$form = id(new PHUIFormLayoutView())
->setFullWidth(true)
->appendChild(
phutil_tag(

View file

@ -116,7 +116,7 @@ EOBODY;
$error_view->setErrors($errors);
}
$email_auth = new AphrontFormLayoutView();
$email_auth = new PHUIFormLayoutView();
$email_auth->appendChild($error_view);
$email_auth
->setUser($request->getUser())

View file

@ -24,8 +24,6 @@ final class PhabricatorEmailVerificationController
$user->getPHID(),
$this->code);
$color = PhabricatorActionHeaderView::HEADER_DARK_GREY;
if (!$email) {
$title = pht('Unable to Verify Email');
$content = pht(
@ -33,7 +31,6 @@ final class PhabricatorEmailVerificationController
'address has been removed, or the email address is owned by another '.
'user. Make sure you followed the link in the email correctly and are '.
'logged in with the user account associated with the email address.');
$color = PhabricatorActionHeaderView::HEADER_RED;
$continue = pht('Rats!');
} else if ($email->getIsVerified()) {
$title = pht('Address Already Verified');
@ -56,7 +53,6 @@ final class PhabricatorEmailVerificationController
$dialog = id(new AphrontDialogView())
->setUser($user)
->setTitle($title)
->setHeaderColor($color)
->setMethod('GET')
->addCancelButton('/', $continue)
->appendChild($content);

View file

@ -202,7 +202,6 @@ final class PhabricatorAuthEditController
$form = id(new AphrontFormView())
->setUser($viewer)
->setFlexible(true)
->appendChild(
id(new AphrontFormStaticControl())
->setLabel(pht('Provider'))
@ -270,11 +269,15 @@ final class PhabricatorAuthEditController
->setTransactions($xactions);
}
$form_box = id(new PHUIFormBoxView())
->setHeaderText($title)
->setFormError($errors)
->setForm($form);
return $this->buildApplicationPage(
array(
$crumbs,
$errors,
$form,
$form_box,
$xaction_view,
),
array(

View file

@ -81,6 +81,10 @@ final class PhabricatorAuthNewController
->addCancelButton($this->getApplicationURI())
->setValue(pht('Continue')));
$form_box = id(new PHUIFormBoxView())
->setHeaderText(pht('Add Authentication Provider'))
->setFormError($errors)
->setForm($form);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb(
@ -90,8 +94,7 @@ final class PhabricatorAuthNewController
return $this->buildApplicationPage(
array(
$crumbs,
$errors,
$form,
$form_box,
),
array(
'title' => pht('Add Authentication Provider'),

View file

@ -104,7 +104,7 @@ final class PhabricatorAuthProviderLDAP
$errors[] = pht('Username or password are incorrect.');
}
$form = id(new AphrontFormLayoutView())
$form = id(new PHUIFormLayoutView())
->setUser($viewer)
->setFullWidth(true)
->appendChild(

View file

@ -115,7 +115,7 @@ final class PhabricatorAuthProviderPassword
$errors = id(new AphrontErrorView())->setErrors($errors);
}
$form = id(new AphrontFormLayoutView())
$form = id(new PHUIFormLayoutView())
->setFullWidth(true)
->appendChild($errors)
->appendChild(

View file

@ -126,14 +126,13 @@ final class PhabricatorCalendarEditStatusController
$dialog->setSubmitURI(
$this->getApplicationURI('status/edit/'.$status->getID().'/'));
}
$form = new AphrontFormLayoutView();
$form = new PHUIFormLayoutView();
if ($error_view) {
$form->appendChild($error_view);
}
} else {
$form = id(new AphrontFormView())
->setUser($user)
->setFlexible(true);
->setUser($user);
}
$form
@ -164,14 +163,17 @@ final class PhabricatorCalendarEditStatusController
}
$form->appendChild($submit);
$form_box = id(new PHUIFormBoxView())
->setHeaderText($page_title)
->setFormError($error_view)
->setForm($form);
$nav = $this->buildSideNavView($status);
$nav->selectFilter($filter);
$nav->appendChild(
array(
id(new PhabricatorHeaderView())->setHeader($page_title),
$error_view,
$form,
$form_box,
));
return $this->buildApplicationPage(

View file

@ -150,7 +150,6 @@ final class PhabricatorChatLogChannelLogController
->setUser($user)
->setMethod('GET')
->setAction($uri)
->setNoShading(true)
->appendChild(
id(new AphrontFormTextControl())
->setLabel(pht('Date'))

View file

@ -69,7 +69,6 @@ final class PhabricatorConduitConsoleController
->setUser($request->getUser())
->setAction('/api/'.$this->method)
->addHiddenInput('allowEmptyParams', 1)
->setFlexible(true)
->appendChild(
id(new AphrontFormStaticControl())
->setLabel('Description')

View file

@ -98,7 +98,6 @@ final class PhabricatorConfigEditController
}
$form = new AphrontFormView();
$form->setFlexible(true);
$error_view = null;
if ($errors) {
@ -194,6 +193,11 @@ final class PhabricatorConfigEditController
$title = pht('Edit %s', $this->key);
$short = pht('Edit');
$form_box = id(new PHUIFormBoxView())
->setHeaderText($title)
->setFormError($error_view)
->setForm($form);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
@ -212,7 +216,6 @@ final class PhabricatorConfigEditController
->setName($this->key)
->setHref('/config/edit/'.$this->key));
$xactions = id(new PhabricatorConfigTransactionQuery())
->withObjectPHIDs(array($config_entry->getPHID()))
->setViewer($user)
@ -226,9 +229,7 @@ final class PhabricatorConfigEditController
return $this->buildApplicationPage(
array(
$crumbs,
id(new PhabricatorHeaderView())->setHeader($title),
$error_view,
$form,
$form_box,
$xaction_view,
),
array(

View file

@ -74,7 +74,7 @@ final class ConpherenceNewController extends ConpherenceController {
->addCancelButton($cancel_uri)
->addSubmitButton(pht('Send Message'));
$form = id(new AphrontFormLayoutView())
$form = id(new PHUIFormLayoutView())
->setUser($user)
->setFullWidth(true)
->appendChild(

View file

@ -181,7 +181,7 @@ final class ConpherenceUpdateController
$user = $request->getUser();
$add_person = $request->getStr('add_person');
$form = id(new AphrontFormLayoutView())
$form = id(new PHUIFormLayoutView())
->setUser($user)
->setFullWidth(true)
->appendChild(
@ -222,7 +222,6 @@ final class ConpherenceUpdateController
require_celerity_resource('conpherence-update-css');
return id(new AphrontDialogView())
->setTitle(pht('Remove Participants'))
->setHeaderColor(PhabricatorActionHeaderView::HEADER_RED)
->addHiddenInput('action', 'remove_person')
->addHiddenInput('__continue__', true)
->addHiddenInput('remove_person', $remove_person)
@ -233,7 +232,7 @@ final class ConpherenceUpdateController
ConpherenceThread $conpherence,
$error_view) {
$form = id(new AphrontFormLayoutView())
$form = id(new PHUIFormLayoutView())
->appendChild($error_view)
->appendChild(
id(new AphrontFormTextControl())

View file

@ -137,7 +137,6 @@ final class ConpherenceViewController extends
$form =
id(new AphrontFormView())
->setAction($update_uri)
->setFlexible(true)
->addSigil('conpherence-pontificate')
->setWorkflow(true)
->setUser($user)

View file

@ -17,6 +17,7 @@ final class PhabricatorCountdownEditController
$user = $request->getUser();
if ($this->id) {
$page_title = pht('Edit Countdown');
$countdown = id(new PhabricatorCountdownQuery())
->setViewer($user)
->withIDs(array($this->id))
@ -32,6 +33,7 @@ final class PhabricatorCountdownEditController
return new Aphront404Response();
}
} else {
$page_title = pht('Create Countdown');
$countdown = new PhabricatorCountdown();
$countdown->setEpoch(time());
}
@ -108,7 +110,6 @@ final class PhabricatorCountdownEditController
$form = id(new AphrontFormView())
->setUser($user)
->setAction($request->getRequestURI()->getPath())
->setFlexible(true)
->appendChild(
id(new AphrontFormTextControl())
->setLabel(pht('Title'))
@ -127,15 +128,18 @@ final class PhabricatorCountdownEditController
->addCancelButton($cancel_uri)
->setValue($submit_label));
$form_box = id(new PHUIFormBoxView())
->setHeaderText($page_title)
->setFormError($error_view)
->setForm($form);
return $this->buildApplicationPage(
array(
$crumbs,
$error_view,
$form,
$form_box,
),
array(
'title' => pht('Edit Countdown'),
'title' => $page_title,
'device' => true,
));
}

View file

@ -41,7 +41,6 @@ final class DifferentialDiffCreateController extends DifferentialController {
}
$form = new AphrontFormView();
$form->setFlexible(true);
$arcanist_href = PhabricatorEnv::getDoclink(
'article/Arcanist_User_Guide.html');
$arcanist_link = phutil_tag(
@ -83,6 +82,11 @@ final class DifferentialDiffCreateController extends DifferentialController {
->addCancelButton($cancel_uri)
->setValue(pht("Create Diff")));
$form_box = id(new PHUIFormBoxView())
->setHeaderText(pht('Create New Diff'))
->setFormError($errors)
->setForm($form);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
@ -96,8 +100,7 @@ final class DifferentialDiffCreateController extends DifferentialController {
return $this->buildApplicationPage(
array(
$crumbs,
$errors,
$form
$form_box,
),
array(
'title' => pht('Create Diff'),

View file

@ -72,7 +72,6 @@ final class DifferentialDiffViewController extends DifferentialController {
->setAction('/differential/revision/edit/')
->addHiddenInput('diffID', $diff->getID())
->addHiddenInput('viaDiffView', 1)
->setFlexible(true)
->appendRemarkupInstructions(
pht(
'Review the diff for correctness. When you are satisfied, either '.

View file

@ -114,7 +114,6 @@ final class DifferentialRevisionEditController extends DifferentialController {
$form = new AphrontFormView();
$form->setUser($request->getUser());
$form->setFlexible(true);
if ($diff) {
$form->addHiddenInput('diffID', $diff->getID());
}

View file

@ -70,8 +70,8 @@ final class DifferentialAddCommentView extends AphrontView {
$form = new AphrontFormView();
$form
->setWorkflow(true)
->setFlexible(true)
->setUser($this->user)
->setShaded(true)
->setAction($this->actionURI)
->addHiddenInput('revision_id', $revision->getID())
->appendChild(

View file

@ -132,8 +132,7 @@ final class DiffusionBrowseController extends DiffusionController {
$drequest = $this->getDiffusionRequest();
$form = id(new AphrontFormView())
->setUser($this->getRequest()->getUser())
->setMethod('GET')
->setNoShading(true);
->setMethod('GET');
switch ($drequest->getRepository()->getVersionControlSystem()) {
case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN:

View file

@ -55,7 +55,6 @@ final class DiffusionCommitEditController extends DiffusionController {
$form = id(new AphrontFormView())
->setUser($user)
->setAction($request->getRequestURI()->getPath())
->setFlexible(true)
->appendChild(
id(new AphrontFormTokenizerControl())
->setLabel(pht('Projects'))

View file

@ -83,7 +83,6 @@ final class DiffusionRepositoryEditBasicController extends DiffusionController {
$form = id(new AphrontFormView())
->setUser($user)
->setFlexible(true)
->appendChild(
id(new AphrontFormTextControl())
->setName('name')

View file

@ -74,7 +74,6 @@ final class DiffusionRepositoryEditEncodingController
$form = id(new AphrontFormView())
->setUser($user)
->setFlexible(true)
->appendRemarkupInstructions($this->getEncodingInstructions())
->appendChild(
id(new AphrontFormTextControl())

View file

@ -76,17 +76,15 @@ final class PhabricatorFileUploadController extends PhabricatorFileController {
$global_upload = id(new PhabricatorGlobalUploadTargetView())
->setShowIfSupportedID($support_id);
$panel = new AphrontPanelView();
$panel->setHeader(pht('New File Upload'));
$panel->setNoBackground();
$panel->appendChild($form);
$panel->setWidth(AphrontPanelView::WIDTH_FORM);
$form_box = id(new PHUIFormBoxView())
->setHeaderText($title)
->setFormError($errors)
->setForm($form);
return $this->buildApplicationPage(
array(
$crumbs,
$errors,
$panel,
$form_box,
$global_upload,
),
array(

View file

@ -46,7 +46,7 @@ final class PhabricatorFlagEditController extends PhabricatorFlagController {
require_celerity_resource('phabricator-flag-css');
$form = new AphrontFormLayoutView();
$form = new PHUIFormLayoutView();
$is_new = !$flag->getID();

View file

@ -43,7 +43,6 @@ final class HeraldDeleteController extends HeraldController {
$dialog = new AphrontDialogView();
$dialog->setUser($request->getUser());
$dialog->setTitle(pht('Really delete this rule?'));
$dialog->setHeaderColor(PhabricatorActionHeaderView::HEADER_RED);
$dialog->appendChild(pht(
"Are you sure you want to delete the rule: %s?",
$rule->getName()));

View file

@ -57,7 +57,6 @@ final class HeraldNewController extends HeraldController {
$form = id(new AphrontFormView())
->setUser($user)
->setAction('/herald/edit/')
->setFlexible(true)
->appendChild(
id(new AphrontFormSelectControl())
->setLabel(pht('New Rule for'))
@ -70,6 +69,10 @@ final class HeraldNewController extends HeraldController {
->setValue(pht('Create Rule'))
->addCancelButton($this->getApplicationURI()));
$form_box = id(new PHUIFormBoxView())
->setHeaderText(pht('Create Herald Rule'))
->setForm($form);
$crumbs = $this
->buildApplicationCrumbs()
->addCrumb(
@ -79,7 +82,7 @@ final class HeraldNewController extends HeraldController {
return $this->buildApplicationPage(
array(
$crumbs,
$form,
$form_box,
),
array(
'title' => pht('Create Herald Rule'),

View file

@ -182,6 +182,11 @@ final class HeraldRuleController extends HeraldController {
? pht('Edit Herald Rule')
: pht('Create Herald Rule');
$form_box = id(new PHUIFormBoxView())
->setHeaderText($title)
->setFormError($error_view)
->setForm($form);
$crumbs = $this
->buildApplicationCrumbs()
->addCrumb(
@ -191,8 +196,7 @@ final class HeraldRuleController extends HeraldController {
return $this->buildApplicationPage(
array(
$crumbs,
$error_view,
$form,
$form_box,
),
array(
'title' => pht('Edit Rule'),

View file

@ -113,7 +113,6 @@ final class LegalpadDocumentEditController extends LegalpadController {
}
$form = id(new AphrontFormView())
->setFlexible(true)
->setUser($user)
->appendChild(
id(new AphrontFormTextControl())
@ -168,6 +167,11 @@ final class LegalpadDocumentEditController extends LegalpadController {
$form
->appendChild($submit);
$form_box = id(new PHUIFormBoxView())
->setHeaderText($title)
->setFormError($error_view)
->setForm($form);
$crumbs = $this->buildApplicationCrumbs($this->buildSideNav());
$crumbs->addCrumb(
id(new PhabricatorCrumbView())->setName($short));
@ -182,8 +186,7 @@ final class LegalpadDocumentEditController extends LegalpadController {
return $this->buildApplicationPage(
array(
$crumbs,
$error_view,
$form,
$form_box,
$preview
),
array(

View file

@ -177,7 +177,6 @@ final class LegalpadDocumentSignController extends LegalpadController {
$data = $signature->getSignatureData();
$form = id(new AphrontFormView())
->setUser($user)
->setFlexible(true)
->appendChild(
id(new AphrontFormInsetView())
->setTitle(pht('Sign and Agree'))

View file

@ -153,7 +153,6 @@ final class PhabricatorMacroEditController
$form
->setEncType('multipart/form-data')
->setFlexible(true)
->appendChild(
id(new AphrontFormTextControl())
->setLabel(pht('Name'))
@ -239,7 +238,6 @@ final class PhabricatorMacroEditController
->setHeader(pht('Upload New File'));
$upload_form = id(new AphrontFormView())
->setFlexible(true)
->setEncType('multipart/form-data')
->setUser($request->getUser());
@ -263,11 +261,15 @@ final class PhabricatorMacroEditController
$upload = array($upload_header, $upload_form);
}
$form_box = id(new PHUIFormBoxView())
->setHeaderText($title)
->setFormError($error_view)
->setForm($form);
return $this->buildApplicationPage(
array(
$crumbs,
$error_view,
$form,
$form_box,
$upload,
),
array(

View file

@ -44,7 +44,7 @@ final class PhabricatorMacroMemeDialogController
}
}
$view = id(new AphrontFormLayoutView())
$view = id(new PHUIFormLayoutView())
->appendChild(
id(new AphrontFormTextControl())
->setLabel(pht('Macro'))

View file

@ -14,6 +14,7 @@ final class PhabricatorMailingListsEditController
$viewer = $request->getUser();
if ($this->id) {
$page_title = pht('Edit Mailing List');
$list = id(new PhabricatorMailingListQuery())
->setViewer($viewer)
->withIDs(array($this->id))
@ -22,6 +23,7 @@ final class PhabricatorMailingListsEditController
return new Aphront404Response();
}
} else {
$page_title = pht('Create Mailing List');
$list = new PhabricatorMetaMTAMailingList();
}
@ -124,14 +126,18 @@ final class PhabricatorMailingListsEditController
->setName(pht('Create Mailing List')));
}
$form_box = id(new PHUIFormBoxView())
->setHeaderText($page_title)
->setFormError($error_view)
->setForm($form);
return $this->buildApplicationPage(
array(
$crumbs,
$error_view,
$form,
$form_box,
),
array(
'title' => pht('Edit Mailing List'),
'title' => $page_title,
'device' => true,
));
}

View file

@ -76,7 +76,7 @@ final class ManiphestExportController extends ManiphestController {
$dialog->appendChild(phutil_tag('p', array(), pht(
'Do you want to export the query results to Excel?')));
$form = id(new AphrontFormLayoutView())
$form = id(new PHUIFormLayoutView())
->appendChild(
id(new AphrontFormSelectControl())
->setLabel(pht('Format:'))

View file

@ -198,6 +198,7 @@ final class ManiphestTaskDetailController extends ManiphestController {
$comment_form = new AphrontFormView();
$comment_form
->setUser($user)
->setShaded(true)
->setAction('/maniphest/transaction/save/')
->setEncType('multipart/form-data')
->addHiddenInput('taskID', $task->getID())

View file

@ -381,10 +381,9 @@ final class ManiphestTaskEditController extends ManiphestController {
$project_tokenizer_id = celerity_generate_unique_node_id();
if ($request->isAjax()) {
$form = new AphrontFormLayoutView();
$form = new PHUIFormLayoutView();
} else {
$form = new AphrontFormView();
$form->setFlexible(true);
$form
->setUser($user)
->addHiddenInput('template', $template_id);
@ -536,6 +535,11 @@ final class ManiphestTaskEditController extends ManiphestController {
->addCancelButton($cancel_uri)
->setValue($button_name));
$form_box = id(new PHUIFormBoxView())
->setHeaderText($header_name)
->setFormError($error_view)
->setForm($form);
$preview = id(new PHUIRemarkupPreviewPanel())
->setHeader(pht('Description Preview'))
->setControlID('description-textarea')
@ -561,8 +565,7 @@ final class ManiphestTaskEditController extends ManiphestController {
return $this->buildApplicationPage(
array(
$crumbs,
$error_view,
$form,
$form_box,
$preview,
),
array(

View file

@ -124,7 +124,6 @@ final class ManiphestTaskListController extends ManiphestController {
$form = id(new AphrontFormView())
->setUser($user)
->setNoShading(true)
->setAction(
$request->getRequestURI()
->alter('key', null)

View file

@ -29,7 +29,6 @@ final class PhabricatorOwnersDeleteController
$dialog = id(new AphrontDialogView())
->setUser($user)
->setTitle('Really delete this package?')
->setHeaderColor(PhabricatorActionHeaderView::HEADER_RED)
->appendChild(hsprintf(
'<p>%s</p>',
$text))

View file

@ -181,7 +181,6 @@ final class PhabricatorOwnersEditController
$form = id(new AphrontFormView())
->setUser($user)
->setFlexible(true)
->appendChild(
id(new AphrontFormTextControl())
->setLabel(pht('Name'))
@ -252,13 +251,13 @@ final class PhabricatorOwnersEditController
->addCancelButton($cancel_uri)
->setValue(pht('Save Package')));
$header = id(new PhabricatorHeaderView())
->setHeader($title);
$form_box = id(new PHUIFormBoxView())
->setHeaderText($title)
->setFormError($error_view)
->setForm($form);
$nav = $this->buildSideNavView();
$nav->appendChild($error_view);
$nav->appendChild($header);
$nav->appendChild($form);
$nav->appendChild($form_box);
return $this->buildApplicationPage(
array(

View file

@ -168,7 +168,6 @@ final class PhabricatorOwnersListController
->setUser($user)
->setAction('/owners/view/search/')
->setMethod('GET')
->setNoShading(true)
->appendChild(
id(new AphrontFormTextControl())
->setName('name')

View file

@ -131,7 +131,6 @@ final class PhabricatorPasteEditController extends PhabricatorPasteController {
}
$form = new AphrontFormView();
$form->setFlexible(true);
$langs = array(
'' => pht('(Detect From Filename in Title)'),
@ -200,12 +199,16 @@ final class PhabricatorPasteEditController extends PhabricatorPasteController {
$short = pht('Edit');
} else {
$submit->setValue(pht('Create Paste'));
$title = pht('Create Paste');
$title = pht('Create New Paste');
$short = pht('Create');
}
$form
->appendChild($submit);
$form->appendChild($submit);
$form_box = id(new PHUIFormBoxView())
->setHeaderText($title)
->setFormError($error_view)
->setForm($form);
$crumbs = $this->buildApplicationCrumbs($this->buildSideNavView());
if (!$is_create) {
@ -220,9 +223,7 @@ final class PhabricatorPasteEditController extends PhabricatorPasteController {
return $this->buildApplicationPage(
array(
$crumbs,
id(new PhabricatorHeaderView())->setHeader($title),
$error_view,
$form,
$form_box,
),
array(
'title' => $title,

View file

@ -343,14 +343,18 @@ final class PhabricatorPeopleEditController
id(new AphrontFormSubmitControl())
->setValue(pht('Save')));
$header = new PhabricatorHeaderView();
if ($user->getID()) {
$header->setHeader(pht('Edit User'));
$title = pht('Edit User');
} else {
$header->setHeader(pht('Create New User'));
$title = pht('Create New User');
}
return array($error_view, $form);
$form_box = id(new PHUIFormBoxView())
->setHeaderText($title)
->setFormError($error_view)
->setForm($form);
return array($form_box);
}
private function processRoleRequest(PhabricatorUser $user) {
@ -448,10 +452,14 @@ final class PhabricatorPeopleEditController
->setValue(pht('Edit Role')));
}
$header = new PhabricatorHeaderView();
$header->setHeader(pht('Edit Role'));
$title = pht('Edit Role');
return array($error_view, $header, $form);
$form_box = id(new PHUIFormBoxView())
->setHeaderText($title)
->setFormError($error_view)
->setForm($form);
return array($form_box);
}
private function processCertificateRequest($user) {
@ -486,10 +494,13 @@ final class PhabricatorPeopleEditController
pht('You may only view the certificates of System Agents.')));
}
$header = new PhabricatorHeaderView();
$header->setHeader(pht('Conduit Certificate'));
$title = pht('Conduit Certificate');
return array($header, $form);
$form_box = id(new PHUIFormBoxView())
->setHeaderText($title)
->setForm($form);
return array($form_box);
}
private function processRenameRequest(PhabricatorUser $user) {
@ -581,10 +592,12 @@ final class PhabricatorPeopleEditController
id(new AphrontFormSubmitControl())
->setValue(pht('Change Username')));
$header = new PhabricatorHeaderView();
$header->setHeader(pht('Change Username'));
$form_box = id(new PHUIFormBoxView())
->setHeaderText(pht('Change Username'))
->setFormError($errors)
->setForm($form);
return array($errors, $header, $form);
return array($form_box);
}
private function processDeleteRequest(PhabricatorUser $user) {
@ -672,10 +685,12 @@ final class PhabricatorPeopleEditController
id(new AphrontFormSubmitControl())
->setValue(pht('Delete User')));
$header = new PhabricatorHeaderView();
$header->setHeader(pht('Delete User'));
$form_box = id(new PHUIFormBoxView())
->setHeaderText(pht('Delete User'))
->setFormError($errors)
->setForm($form);
return array($errors, $header, $form);
return array($form_box);
}
private function getRoleInstructions() {

View file

@ -74,10 +74,14 @@ final class PhabricatorPeopleProfileEditController
->addCancelButton($profile_uri)
->setValue(pht('Save Profile')));
$form_box = id(new PHUIFormBoxView())
->setHeaderText(pht('Edit Your Profile'))
->setForm($form);
return $this->buildApplicationPage(
array(
$crumbs,
$form,
$form_box,
),
array(
'title' => $title,

View file

@ -98,7 +98,7 @@ final class PhabricatorPeopleProfilePictureController
id(new PhabricatorCrumbView())
->setName($title));
$form = id(new AphrontFormLayoutView())
$form = id(new PHUIFormLayoutView())
->setUser($viewer);
$default_image = PhabricatorFile::loadBuiltin($viewer, 'profile.png');
@ -265,7 +265,6 @@ final class PhabricatorPeopleProfilePictureController
$upload_form = id(new AphrontFormView())
->setUser($user)
->setFlexible(true)
->setEncType('multipart/form-data')
->appendChild(
id(new AphrontFormFileControl())

View file

@ -38,7 +38,6 @@ final class PhameBlogDeleteController extends PhameController {
$dialog = id(new AphrontDialogView())
->setUser($user)
->setTitle(pht('Delete Blog?'))
->setHeaderColor(PhabricatorActionHeaderView::HEADER_RED)
->appendChild(
pht(
'Really delete the blog "%s"? It will be gone forever.',

View file

@ -107,7 +107,6 @@ final class PhameBlogEditController
$form = id(new AphrontFormView())
->setUser($user)
->setFlexible(true)
->appendChild(
id(new AphrontFormTextControl())
->setLabel(pht('Name'))
@ -171,6 +170,11 @@ final class PhameBlogEditController
$error_view = null;
}
$form_box = id(new PHUIFormBoxView())
->setHeaderText($page_title)
->setFormError($error_view)
->setForm($form);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
@ -182,8 +186,7 @@ final class PhameBlogEditController
$nav->appendChild(
array(
$crumbs,
$error_view,
$form,
$form_box,
));
return $this->buildApplicationPage(

View file

@ -38,7 +38,6 @@ final class PhamePostDeleteController extends PhameController {
$dialog = id(new AphrontDialogView())
->setUser($user)
->setTitle(pht('Delete Post?'))
->setHeaderColor(PhabricatorActionHeaderView::HEADER_RED)
->appendChild(
pht(
'Really delete the post "%s"? It will be gone forever.',

View file

@ -100,7 +100,6 @@ final class PhamePostEditController
$form = id(new AphrontFormView())
->setUser($user)
->setFlexible(true)
->addHiddenInput('blog', $request->getInt('blog'))
->appendChild(
id(new AphrontFormMarkupControl())
@ -174,6 +173,11 @@ final class PhamePostEditController
$error_view = null;
}
$form_box = id(new PHUIFormBoxView())
->setHeaderText($page_title)
->setFormError($error_view)
->setForm($form);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
@ -184,8 +188,7 @@ final class PhamePostEditController
$nav->appendChild(
array(
$crumbs,
$error_view,
$form,
$form_box,
$preview_panel,
));

View file

@ -94,7 +94,6 @@ final class PhamePostNewController extends PhameController {
$form = id(new AphrontFormView())
->setUser($user)
->setFlexible(true)
->appendChild(
id(new AphrontFormSelectControl())
->setLabel(pht('Blog'))
@ -117,7 +116,12 @@ final class PhamePostNewController extends PhameController {
->setValue(pht('Continue')));
}
$nav->appendChild($form);
$form_box = id(new PHUIFormBoxView())
->setHeaderText($title)
->setForm($form);
$nav->appendChild($form_box);
}
return $this->buildApplicationPage(

View file

@ -42,7 +42,6 @@ final class PhamePostPublishController extends PhameController {
$form = id(new AphrontFormView())
->setUser($user)
->setFlexible(true)
->appendChild(
id(new AphrontFormSubmitControl())
->setValue(pht('Publish Post'))

View file

@ -176,15 +176,15 @@ final class PhluxEditController extends PhluxController {
->setHref($request->getRequestURI()));
}
$header = id(new PhabricatorHeaderView())
->setHeader($title);
$form_box = id(new PHUIFormBoxView())
->setHeaderText($title)
->setFormError($errors)
->setForm($form);
return $this->buildApplicationPage(
array(
$crumbs,
$header,
$errors,
$form,
$form_box,
),
array(
'title' => $title,

View file

@ -285,7 +285,6 @@ final class PholioMockEditController extends PholioController {
require_celerity_resource('pholio-edit-css');
$form = id(new AphrontFormView())
->setUser($user)
->setFlexible(true)
->appendChild($order_control)
->appendChild(
id(new AphrontFormTextControl())
@ -322,6 +321,11 @@ final class PholioMockEditController extends PholioController {
->setError($e_images))
->appendChild($submit);
$form_box = id(new PHUIFormBoxView())
->setHeaderText($title)
->setFormError($error_view)
->setForm($form);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
@ -330,8 +334,7 @@ final class PholioMockEditController extends PholioController {
$content = array(
$crumbs,
$error_view,
$form,
$form_box,
);
return $this->buildApplicationPage(

View file

@ -160,9 +160,7 @@ final class PhortuneAccountBuyController
$user);
}
$provider_form = id(new AphrontFormLayoutView())
->setPadded(true)
->setBackgroundShading(true);
$provider_form = new PHUIFormLayoutView();
$provider_form->appendChild(
id(new AphrontFormMarkupControl())
->setLabel('Pay With')

View file

@ -144,7 +144,6 @@ final class PhrequentListController extends PhrequentController {
$form = id(new AphrontFormView())
->setUser($user)
->setNoShading(true)
->setAction($this->getApplicationURI("/view/custom/"));
$user_handles = id(new PhabricatorObjectHandleData($user_phids))

View file

@ -50,7 +50,6 @@ final class PhrictionDeleteController extends PhrictionController {
$dialog = id(new AphrontDialogView())
->setUser($user)
->setTitle(pht('Delete Document?'))
->setHeaderColor(PhabricatorActionHeaderView::HEADER_RED)
->appendChild(
pht('Really delete this document? You can recover it later by '.
'reverting to a previous version.'))

View file

@ -226,8 +226,10 @@ final class PhrictionEditController
->addCancelButton($cancel_uri)
->setValue($submit_button));
$header = id(new PhabricatorHeaderView())
->setHeader($panel_header);
$form_box = id(new PHUIFormBoxView())
->setHeaderText(pht('Edit Document'))
->setFormError($error_view)
->setForm($form);
$preview = id(new PHUIRemarkupPreviewPanel())
->setHeader(pht('Document Preview'))
@ -254,8 +256,7 @@ final class PhrictionEditController
array(
$crumbs,
$draft_note,
$error_view,
$form,
$form_box,
$preview,
),
array(

View file

@ -118,7 +118,7 @@ final class PhrictionMoveController
$descr_caption = $is_serious ? pht('A reason for the move.') :
pht('You better give a good reason for this.');
$form = id(new AphrontFormLayoutView())
$form = id(new PHUIFormLayoutView())
->setUser($user)
->appendChild(
id(new AphrontFormStaticControl())

View file

@ -44,7 +44,7 @@ final class PhrictionNewController extends PhrictionController {
$slug = '';
}
$view = id(new AphrontFormLayoutView())
$view = id(new PHUIFormLayoutView())
->appendChild(id(new AphrontFormTextControl())
->setLabel('/w/')
->setValue($slug)

View file

@ -95,6 +95,11 @@ final class PonderAnswerEditController extends PonderController {
id(new PhabricatorCrumbView())
->setName(pht('Edit Answer')));
$form_box = id(new PHUIFormBoxView())
->setHeaderText(pht('Edit Answer'))
->setFormError($errors)
->setForm($form);
$preview = id(new PHUIRemarkupPreviewPanel())
->setHeader(pht('Answer Preview'))
->setControlID($answer_content_id)
@ -103,8 +108,7 @@ final class PonderAnswerEditController extends PonderController {
return $this->buildApplicationPage(
array(
$crumbs,
$errors,
$form,
$form_box,
$preview,
),
array(

View file

@ -85,7 +85,6 @@ final class PonderQuestionEditController extends PonderController {
$form = id(new AphrontFormView())
->setUser($user)
->setFlexible(true)
->appendChild(
id(new AphrontFormTextControl())
->setLabel(pht('Question'))
@ -109,6 +108,11 @@ final class PonderQuestionEditController extends PonderController {
->setControlID('content')
->setPreviewURI($this->getApplicationURI('preview/'));
$form_box = id(new PHUIFormBoxView())
->setHeaderText(pht('Ask New Question'))
->setFormError($error_view)
->setForm($form);
$crumbs = $this->buildApplicationCrumbs();
$id = $question->getID();
@ -129,12 +133,11 @@ final class PonderQuestionEditController extends PonderController {
return $this->buildApplicationPage(
array(
$crumbs,
$error_view,
$form,
$form_box,
$preview,
),
array(
'title' => pht('Ask a Question'),
'title' => pht('Ask New Question'),
'device' => true,
));
}

View file

@ -26,7 +26,6 @@ final class PonderAddAnswerView extends AphrontView {
$form = new AphrontFormView();
$form
->setFlexible(true)
->setUser($this->user)
->setAction($this->actionURI)
->setWorkflow(true)

View file

@ -68,7 +68,7 @@ final class PhabricatorProjectCreateController
}
if ($request->isAjax()) {
$form = new AphrontFormLayoutView();
$form = new PHUIFormLayoutView();
} else {
$form = new AphrontFormView();
$form->setUser($user);
@ -113,11 +113,15 @@ final class PhabricatorProjectCreateController
->setName(pht('Create Project'))
->setHref($this->getApplicationURI().'create/'));
$form_box = id(new PHUIFormBoxView())
->setHeaderText(pht('Create New Project'))
->setFormError($error_view)
->setForm($form);
return $this->buildApplicationPage(
array(
$crumbs,
$error_view,
$form,
$form_box,
),
array(
'title' => pht('Create New Project'),

View file

@ -91,7 +91,6 @@ final class PhabricatorProjectMembersEditController
$form = new AphrontFormView();
$form
->setUser($user)
->setFlexible(true)
->appendChild(
id(new AphrontFormTokenizerControl())
->setName('phids')
@ -101,17 +100,19 @@ final class PhabricatorProjectMembersEditController
id(new AphrontFormSubmitControl())
->addCancelButton('/project/view/'.$project->getID().'/')
->setValue(pht('Add Members')));
$faux_form = id(new AphrontFormLayoutView())
$faux_form = id(new AphrontFormView())
->setUser($user)
->appendChild(
id(new AphrontFormInsetView())
->setTitle(pht('Current Members (%d)', count($handles)))
->appendChild($list));
$box = new PHUIBoxView();
$box->appendChild($faux_form);
$box->setShadow(true);
$box->addPadding(PHUI::PADDING_LARGE);
$box->addMargin(PHUI::MARGIN_LARGE);
$box = id(new PHUIFormBoxView())
->setHeaderText(pht('Current Members (%d)', count($handles)))
->setForm($faux_form);
$form_box = id(new PHUIFormBoxView())
->setHeaderText($title)
->setForm($form);
$crumbs = $this->buildApplicationCrumbs($this->buildSideNavView());
$crumbs->addCrumb(
@ -126,7 +127,7 @@ final class PhabricatorProjectMembersEditController
return $this->buildApplicationPage(
array(
$crumbs,
$form,
$form_box,
$box,
),
array(

View file

@ -151,7 +151,6 @@ final class PhabricatorProjectProfileEditController
->setUser($user)
->setAction($action)
->setEncType('multipart/form-data')
->setFlexible(true)
->appendChild(
id(new AphrontFormTextControl())
->setLabel(pht('Name'))
@ -220,6 +219,10 @@ final class PhabricatorProjectProfileEditController
->addCancelButton('/project/view/'.$project->getID().'/')
->setValue(pht('Save')));
$form_box = id(new PHUIFormBoxView())
->setHeaderText($title)
->setFormError($error_view)
->setForm($form);
$crumbs = $this->buildApplicationCrumbs($this->buildSideNavView());
$crumbs->addCrumb(
@ -234,8 +237,7 @@ final class PhabricatorProjectProfileEditController
return $this->buildApplicationPage(
array(
$crumbs,
$error_view,
$form,
$form_box,
),
array(
'title' => $title,

View file

@ -92,7 +92,6 @@ final class ReleephProjectCreateController extends ReleephProjectController {
$form = id(new AphrontFormView())
->setUser($request->getUser())
->setFlexible(true)
->appendChild($project_name_input)
->appendChild($arc_project_input)
->appendChild(

View file

@ -66,12 +66,10 @@ final class PhabricatorRepositoryCreateController
$error_view->setTitle('Form Errors');
}
$form = new AphrontFormView();
$form
->setUser($user)
->setAction('/repository/create/')
->setFlexible(true)
->appendChild(
id(new AphrontFormTextControl())
->setLabel('Name')
@ -103,14 +101,14 @@ final class PhabricatorRepositoryCreateController
->setValue('Create Repository')
->addCancelButton('/repository/'));
$header = id(new PhabricatorHeaderView())
->setHeader(pht('Create Repository'));
$form_box = id(new PHUIFormBoxView())
->setHeaderText(pht('Create Repository'))
->setFormError($error_view)
->setForm($form);
return $this->buildApplicationPage(
array(
$error_view,
$header,
$form,
$form_box,
),
array(
'title' => pht('Create Repository'),

View file

@ -155,12 +155,12 @@ final class PhabricatorRepositoryEditController
$nav = $this->sideNav;
$header = id(new PhabricatorHeaderView())
->setHeader(pht('Edit Repository'));
$form_box = id(new PHUIFormBoxView())
->setHeaderText(pht('Edit Repository'))
->setFormError($error_view)
->setForm($form);
$nav->appendChild($error_view);
$nav->appendChild($header);
$nav->appendChild($form);
$nav->appendChild($form_box);
return $this->buildApplicationPage(
$nav,
@ -358,7 +358,6 @@ final class PhabricatorRepositoryEditController
$form
->setUser($user)
->setAction('/repository/edit/'.$repository->getID().'/tracking/')
->setFlexible(true)
->appendChild(hsprintf(
'<p class="aphront-form-instructions">Phabricator can track '.
'repositories, importing commits as they happen and notifying '.

View file

@ -133,7 +133,6 @@ final class PhabricatorApplicationSearchController
'query/advanced');
$form = id(new AphrontFormView())
->setNoShading(true)
->setUser($user);
$engine->buildSearchForm($form, $saved_query);

View file

@ -143,7 +143,6 @@ final class PhabricatorSearchController
$search_form
->setUser($user)
->setAction('/search/')
->setNoShading(true)
->appendChild(
phutil_tag(
'input',

View file

@ -92,6 +92,11 @@ final class PhabricatorSearchEditController
$title = pht('Save Query');
}
$form_box = id(new PHUIFormBoxView())
->setHeaderText($title)
->setFormError($errors)
->setForm($form);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
@ -100,8 +105,7 @@ final class PhabricatorSearchEditController
return $this->buildApplicationPage(
array(
$crumbs,
$errors,
$form,
$form_box,
),
array(
'title' => $title,

View file

@ -88,7 +88,6 @@ final class PhabricatorSettingsPanelAccount
$form = new AphrontFormView();
$form
->setUser($user)
->setFlexible(true)
->appendChild(
id(new AphrontFormSelectControl())
->setLabel(pht('Timezone'))
@ -111,13 +110,13 @@ final class PhabricatorSettingsPanelAccount
id(new AphrontFormSubmitControl())
->setValue(pht('Save Account Settings')));
$header = new PhabricatorHeaderView();
$header->setHeader(pht('Account Settings'));
$form_box = id(new PHUIFormBoxView())
->setHeaderText(pht('Account Settings'))
->setForm($form);
return array(
$notice,
$header,
$form,
$form_box,
);
}
}

View file

@ -78,8 +78,9 @@ final class PhabricatorSettingsPanelConduit
->setHeight(AphrontFormTextAreaControl::HEIGHT_SHORT)
->setValue($user->getConduitCertificate()));
$header1 = new PhabricatorHeaderView();
$header1->setHeader(pht('Arcanist Certificate'));
$cert_form = id(new PHUIFormBoxView())
->setHeaderText(pht('Arcanist Certificate'))
->setForm($cert_form);
$regen_instruction = pht('You can regenerate this certificate, which '.
'will invalidate the old certificate and create a new one.');
@ -95,14 +96,13 @@ final class PhabricatorSettingsPanelConduit
id(new AphrontFormSubmitControl())
->setValue(pht('Regenerate Certificate')));
$header = new PhabricatorHeaderView();
$header->setHeader(pht('Regenerate Certificate'));
$regen_form = id(new PHUIFormBoxView())
->setHeaderText(pht('Regenerate Certificate'))
->setForm($regen_form);
return array(
$notice,
$header1,
$cert_form,
$header,
$regen_form,
);
}

View file

@ -56,9 +56,6 @@ final class PhabricatorSettingsPanelConpherencePreferences
id(new AphrontFormSubmitControl())
->setValue(pht('Save Preferences')));
$header = new PhabricatorHeaderView();
$header->setHeader(pht('Conpherence Preferences'));
$error_view = null;
if ($request->getBool('saved')) {
$error_view = id(new AphrontErrorView())
@ -67,10 +64,13 @@ final class PhabricatorSettingsPanelConpherencePreferences
->setErrors(array(pht('Your preferences have been saved.')));
}
$form_box = id(new PHUIFormBoxView())
->setHeaderText(pht('Conpherence Preferences'))
->setFormError($error_view)
->setForm($form);
return array(
$error_view,
$header,
$form,
$form_box,
);
}
}

View file

@ -69,7 +69,6 @@ final class PhabricatorSettingsPanelDeveloperPreferences
$form = id(new AphrontFormView())
->setUser($user)
->setFlexible(true)
->appendRemarkupInstructions($instructions)
->appendChild(
id(new AphrontFormSelectControl())
@ -86,9 +85,6 @@ final class PhabricatorSettingsPanelDeveloperPreferences
id(new AphrontFormSubmitControl())
->setValue(pht('Save Preferences')));
$header = id(new PhabricatorHeaderView())
->setHeader(pht('Developer Settings'));
$error_view = null;
if ($request->getBool('saved')) {
$error_view = id(new AphrontErrorView())
@ -97,10 +93,13 @@ final class PhabricatorSettingsPanelDeveloperPreferences
->setErrors(array(pht('Your preferences have been saved.')));
}
$form_box = id(new PHUIFormBoxView())
->setHeaderText(pht('Developer Settings'))
->setFormError($error_view)
->setForm($form);
return array(
$error_view,
$header,
$form,
$form_box,
);
}
}

View file

@ -58,9 +58,6 @@ final class PhabricatorSettingsPanelDiffPreferences
id(new AphrontFormSubmitControl())
->setValue(pht('Save Preferences')));
$header = new PhabricatorHeaderView();
$header->setHeader(pht('Diff Preferences'));
$error_view = null;
if ($request->getBool('saved')) {
$error_view = id(new AphrontErrorView())
@ -69,10 +66,13 @@ final class PhabricatorSettingsPanelDiffPreferences
->setErrors(array(pht('Your preferences have been saved.')));
}
$form_box = id(new PHUIFormBoxView())
->setHeaderText(pht('Diff Preferences'))
->setFormError($error_view)
->setForm($form);
return array(
$error_view,
$header,
$form,
$form_box,
);
}
}

View file

@ -137,9 +137,6 @@ EXAMPLE;
id(new AphrontFormSubmitControl())
->setValue(pht('Save Preferences')));
$header = new PhabricatorHeaderView();
$header->setHeader(pht('Display Preferences'));
$error_view = null;
if ($request->getStr('saved') === 'true') {
$error_view = id(new AphrontErrorView())
@ -148,10 +145,13 @@ EXAMPLE;
->setErrors(array(pht('Your preferences have been saved.')));
}
$form_box = id(new PHUIFormBoxView())
->setHeaderText(pht('Display Preferences'))
->setFormError($error_view)
->setForm($form);
return array(
$error_view,
$header,
$form,
$form_box,
);
}
}

View file

@ -210,7 +210,7 @@ final class PhabricatorSettingsPanelEmailAddresses
->setErrors($errors);
}
$form = id(new AphrontFormLayoutView())
$form = id(new PHUIFormLayoutView())
->appendChild(
id(new AphrontFormTextControl())
->setLabel(pht('Email'))

View file

@ -216,15 +216,15 @@ final class PhabricatorSettingsPanelEmailPreferences
id(new AphrontFormSubmitControl())
->setValue(pht('Save Preferences')));
$header = new PhabricatorHeaderView();
$header->setHeader(pht('Email Preferences'));
$form_box = id(new PHUIFormBoxView())
->setHeaderText(pht('Email Preferences'))
->setFormError($notice)
->setForm($form);
return id(new AphrontNullView())
->appendChild(
array(
$notice,
$header,
$form,
$form_box,
));
}

View file

@ -48,11 +48,7 @@ final class PhabricatorSettingsPanelHomePreferences
->setURI($this->getPanelURI('?saved=true'));
}
$header = id(new PhabricatorHeaderView())
->setHeader(pht('Home Page Preferences'));
$form = id(new AphrontFormView())
->setFlexible(true)
->setUser($user);
$group_map = PhabricatorApplication::getApplicationGroups();
@ -204,10 +200,13 @@ final class PhabricatorSettingsPanelHomePreferences
->setErrors(array(pht('Your preferences have been saved.')));
}
$form_box = id(new PHUIFormBoxView())
->setHeaderText(pht('Home Page Preferences'))
->setFormError($error_view)
->setForm($form);
return array(
$header,
$error_view,
$form,
$form_box,
);
}
}

View file

@ -159,13 +159,13 @@ final class PhabricatorSettingsPanelPassword
id(new AphrontFormSubmitControl())
->setValue(pht('Save')));
$header = new PhabricatorHeaderView();
$header->setHeader(pht('Change Password'));
$form_box = id(new PHUIFormBoxView())
->setHeaderText(pht('Delete User'))
->setFormError($notice)
->setForm($form);
return array(
$notice,
$header,
$form,
$form_box,
);
}
}

View file

@ -50,9 +50,6 @@ final class PhabricatorSettingsPanelSearchPreferences
id(new AphrontFormSubmitControl())
->setValue(pht('Save')));
$header = new PhabricatorHeaderView();
$header->setHeader(pht('Search Preferences'));
$error_view = null;
if ($request->getStr('saved') === 'true') {
$error_view = id(new AphrontErrorView())
@ -61,10 +58,13 @@ final class PhabricatorSettingsPanelSearchPreferences
->setErrors(array(pht('Your preferences have been saved.')));
}
$form_box = id(new PHUIFormBoxView())
->setHeaderText(pht('Search Preferences'))
->setFormError($error_view)
->setForm($form);
return array(
$error_view,
$header,
$form,
$form_box,
);
}
}

View file

@ -136,7 +136,6 @@ final class PhabricatorSlowvoteEditController
$form = id(new AphrontFormView())
->setUser($user)
->setFlexible(true)
->appendChild($instructions)
->appendChild(
id(new AphrontFormTextAreaControl())
@ -232,11 +231,15 @@ final class PhabricatorSlowvoteEditController
id(new PhabricatorCrumbView())
->setName($title));
$form_box = id(new PHUIFormBoxView())
->setHeaderText($title)
->setFormError($error_view)
->setForm($form);
return $this->buildApplicationPage(
array(
$crumbs,
$error_view,
$form,
$form_box,
),
array(
'title' => $title,

View file

@ -65,7 +65,7 @@ final class PhabricatorApplicationTransactionCommentEditController
$dialog
->addHiddenInput('anchor', $request->getStr('anchor'))
->appendChild(
id(new AphrontFormLayoutView())
id(new PHUIFormLayoutView())
->setFullWidth(true)
->appendChild(
id(new PhabricatorRemarkupControl())

View file

@ -146,9 +146,9 @@ class PhabricatorApplicationTransactionCommentView extends AphrontView {
return id(new AphrontFormView())
->setUser($this->getUser())
->setFlexible(true)
->addSigil('transaction-append')
->setWorkflow(true)
->setShaded(true)
->setMetadata(
array(
'objectPHID' => $this->getObjectPHID(),

View file

@ -40,7 +40,6 @@ final class PhabricatorFormExample extends PhabricatorUIExample {
$form = id(new AphrontFormView())
->setUser($user)
->setFlexible(true)
->appendChild($start_time)
->appendChild($end_time)
->appendChild($null_time)

View file

@ -99,7 +99,7 @@ final class PhabricatorMultiColumnExample extends PhabricatorUIExample {
->setFluidLayout(true)
->setShadow(true);
$shipping = id(new AphrontFormLayoutView())
$shipping = id(new PHUIFormLayoutView())
->setUser($user)
->setFullWidth(true)
->appendChild(
@ -128,7 +128,7 @@ final class PhabricatorMultiColumnExample extends PhabricatorUIExample {
->setDisableAutocomplete(true)
->setSigil('postal-input'));
$cc = id(new AphrontFormLayoutView())
$cc = id(new PHUIFormLayoutView())
->setUser($user)
->setFullWidth(true)
->appendChild(

View file

@ -17,7 +17,6 @@ final class PhabricatorUIListFilterExample extends PhabricatorUIExample {
$filter = new AphrontListFilterView();
$form = new AphrontFormView();
$form->setNoShading(true);
$form->setUser($this->getRequest()->getUser());
$form
->appendChild(

View file

@ -526,6 +526,7 @@ final class CeleritySpriteGenerator {
'yellow-header' => 70,
'grey-header' => 70,
'dark-grey-header' => 70,
'lightblue-header' => 70,
);
$extra_css = array(

View file

@ -11,7 +11,7 @@ final class AphrontDialogView extends AphrontView {
private $class;
private $renderAsForm = true;
private $formID;
private $headerColor = PhabricatorActionHeaderView::HEADER_DARK_GREY;
private $headerColor = PhabricatorActionHeaderView::HEADER_LIGHTBLUE;
private $footers = array();
private $isStandalone;
private $method = 'POST';

View file

@ -1,53 +0,0 @@
<?php
/**
* This provides the layout of an AphrontFormView without actually providing
* the <form /> tag. Useful on its own for creating forms in other forms (like
* dialogs) or forms which aren't submittable.
*/
final class AphrontFormLayoutView extends AphrontView {
private $backgroundShading;
private $padded;
private $fullWidth;
public function setBackgroundShading($shading) {
$this->backgroundShading = $shading;
return $this;
}
public function setPadded($padded) {
$this->padded = $padded;
return $this;
}
public function setFullWidth($width) {
$this->fullWidth = $width;
return $this;
}
public function render() {
$classes = array('aphront-form-view');
if ($this->backgroundShading) {
$classes[] = 'aphront-form-view-shaded';
}
if ($this->padded) {
$classes[] = 'aphront-form-view-padded';
}
if ($this->fullWidth) {
$classes[] = 'aphront-form-full-width';
}
$classes = implode(' ', $classes);
return phutil_tag(
'div',
array(
'class' => $classes,
),
$this->renderChildren());
}
}

View file

@ -9,8 +9,7 @@ final class AphrontFormView extends AphrontView {
private $encType;
private $workflow;
private $id;
private $flexible;
private $noShading;
private $shaded = false;
private $sigils = array();
private $metadata;
@ -24,16 +23,6 @@ final class AphrontFormView extends AphrontView {
return $this->metadata;
}
public function setFlexible($flexible) {
$this->flexible = $flexible;
return $this;
}
public function setNoShading($shading) {
$this->noShading = $shading;
return $this;
}
public function setID($id) {
$this->id = $id;
return $this;
@ -54,6 +43,11 @@ final class AphrontFormView extends AphrontView {
return $this;
}
public function setShaded($shaded) {
$this->shaded = $shaded;
return $this;
}
public function addHiddenInput($key, $value) {
$this->data[$key] = $value;
return $this;
@ -88,20 +82,9 @@ final class AphrontFormView extends AphrontView {
}
public function render() {
if ($this->flexible) {
require_celerity_resource('phabricator-form-view-css');
}
require_celerity_resource('aphront-form-view-css');
$layout = new AphrontFormLayoutView();
if ((!$this->flexible) && (!$this->noShading)) {
$layout
->setBackgroundShading(true)
->setPadded(true);
}
$layout
require_celerity_resource('phui-form-view-css');
$layout = id (new PHUIFormLayoutView())
->appendChild($this->renderDataInputs())
->appendChild($this->renderChildren());
@ -117,7 +100,7 @@ final class AphrontFormView extends AphrontView {
return phabricator_form(
$this->user,
array(
'class' => $this->flexible ? 'phabricator-form-view' : null,
'class' => $this->shaded ? 'phui-form-shaded' : null,
'action' => $this->action,
'method' => $this->method,
'enctype' => $this->encType,

View file

@ -0,0 +1,43 @@
<?php
final class PHUIFormBoxView extends AphrontView {
private $headerText;
private $formError = null;
private $form;
public function setHeaderText($text) {
$this->headerText = $text;
return $this;
}
public function setFormError($error) {
$this->formError = $error;
return $this;
}
public function setForm(AphrontFormView $form) {
$this->form = $form;
return $this;
}
public function render() {
$error = $this->formError ? $this->formError : null;
$header = id(new PhabricatorActionHeaderView())
->setHeaderTitle($this->headerText)
->setHeaderColor(PhabricatorActionHeaderView::HEADER_LIGHTBLUE);
$content = id(new PHUIBoxView())
->appendChild(array($header, $error, $this->form))
->setBorder(true)
->addMargin(PHUI::MARGIN_LARGE_TOP)
->addMargin(PHUI::MARGIN_LARGE_LEFT)
->addMargin(PHUI::MARGIN_LARGE_RIGHT)
->addClass('phui-form-box');
return $content;
}
}

View file

@ -0,0 +1,32 @@
<?php
/**
* This provides the layout of an AphrontFormView without actually providing
* the <form /> tag. Useful on its own for creating forms in other forms (like
* dialogs) or forms which aren't submittable.
*/
final class PHUIFormLayoutView extends AphrontView {
private $fullWidth;
public function setFullWidth($width) {
$this->fullWidth = $width;
return $this;
}
public function render() {
$classes = array('phui-form-view');
if ($this->fullWidth) {
$classes[] = 'phui-form-full-width';
}
return phutil_tag(
'div',
array(
'class' => implode(' ', $classes),
),
$this->renderChildren());
}
}

View file

@ -11,6 +11,7 @@ final class PhabricatorActionHeaderView extends AphrontView {
const HEADER_GREEN = 'green';
const HEADER_RED = 'red';
const HEADER_YELLOW = 'yellow';
const HEADER_LIGHTBLUE ='lightblue';
private $headerTitle;
private $headerHref;

Some files were not shown because too many files have changed in this diff Show more