mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-21 13:00:56 +01:00
Use AphrontFormLayoutView, not AphrontFormView, for GitHub 'Repository'
interface Summary: See T58. When I originally wrote this interface you couldn't make a form that looked like a form but wasn't really a form, so I made it a real form. That meant you could hit "return" in the text input and submit the form, which didn't do anything but is vaguely silly. After D422 there's a layout-only form element, so switch to that. Test Plan: Loaded the tab, hit return in the textarea, it didn't do a form submit. Reviewed By: jungejason Reviewers: jungejason, tuomaspelkonen, aran CC: aran, jungejason, epriestley Differential Revision: 719
This commit is contained in:
parent
6e08a9215d
commit
da8beefa6c
2 changed files with 4 additions and 3 deletions
|
@ -508,7 +508,6 @@ class PhabricatorRepositoryEditController
|
|||
|
||||
private function processGithubRequest() {
|
||||
$request = $this->getRequest();
|
||||
$user = $request->getUser();
|
||||
$repository = $this->repository;
|
||||
$repository_id = $repository->getID();
|
||||
|
||||
|
@ -516,9 +515,10 @@ class PhabricatorRepositoryEditController
|
|||
$path = '/github-post-receive/'.$repository_id.'/'.$token.'/';
|
||||
$post_uri = PhabricatorEnv::getURI($path);
|
||||
|
||||
$gitform = new AphrontFormView();
|
||||
$gitform = new AphrontFormLayoutView();
|
||||
$gitform
|
||||
->setUser($user)
|
||||
->setBackgroundShading(true)
|
||||
->setPadded(true)
|
||||
->appendChild(
|
||||
'<p class="aphront-form-instructions">You can configure GitHub to '.
|
||||
'notify Phabricator after changes are pushed. Log into GitHub, go '.
|
||||
|
|
|
@ -22,6 +22,7 @@ phutil_require_module('phabricator', 'view/form/control/submit');
|
|||
phutil_require_module('phabricator', 'view/form/control/text');
|
||||
phutil_require_module('phabricator', 'view/form/control/textarea');
|
||||
phutil_require_module('phabricator', 'view/form/error');
|
||||
phutil_require_module('phabricator', 'view/form/layout');
|
||||
phutil_require_module('phabricator', 'view/layout/panel');
|
||||
phutil_require_module('phabricator', 'view/layout/sidenav');
|
||||
phutil_require_module('phabricator', 'view/utils');
|
||||
|
|
Loading…
Reference in a new issue