Simplify PHUIObjectBoxViews handling of Save and Error states
Summary: This removes the bulk of the "Form Errors" text, some variations likely exists. These are a bit redundant and space consuming. I'd also like to back ErrorView more into PHUIObjectBox. Test Plan: Test out the forms, see errors without the text. Reviewers: epriestley, btrahan CC: Korvin, epriestley, aran, hach-que Differential Revision: https://secure.phabricator.com/D7924
This commit is contained in:
@@ -269,7 +269,7 @@ final class DiffusionCommitController extends DiffusionController {
|
||||
->appendChild(
|
||||
pht("This commit is very large. Load each file individually."));
|
||||
|
||||
$change_panel->setFormError($warning_view);
|
||||
$change_panel->setErrorView($warning_view);
|
||||
$header->addActionLink($button);
|
||||
}
|
||||
|
||||
|
||||
@@ -83,14 +83,6 @@ final class DiffusionRepositoryEditBasicController
|
||||
$crumbs->addTextCrumb(pht('Edit Basics'));
|
||||
|
||||
$title = pht('Edit %s', $repository->getName());
|
||||
|
||||
$error_view = null;
|
||||
if ($errors) {
|
||||
$error_view = id(new AphrontErrorView())
|
||||
->setTitle(pht('Form Errors'))
|
||||
->setErrors($errors);
|
||||
}
|
||||
|
||||
$project_handles = $this->loadViewerHandles($repository->getProjectPHIDs());
|
||||
|
||||
$form = id(new AphrontFormView())
|
||||
@@ -122,7 +114,7 @@ final class DiffusionRepositoryEditBasicController
|
||||
$object_box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText($title)
|
||||
->setForm($form)
|
||||
->setFormError($error_view);
|
||||
->setFormErrors($errors);
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
array(
|
||||
|
||||
@@ -61,13 +61,6 @@ final class DiffusionRepositoryEditEncodingController
|
||||
|
||||
$title = pht('Edit %s', $repository->getName());
|
||||
|
||||
$error_view = null;
|
||||
if ($errors) {
|
||||
$error_view = id(new AphrontErrorView())
|
||||
->setTitle(pht('Form Errors'))
|
||||
->setErrors($errors);
|
||||
}
|
||||
|
||||
$form = id(new AphrontFormView())
|
||||
->setUser($user)
|
||||
->appendRemarkupInstructions($this->getEncodingInstructions())
|
||||
@@ -85,7 +78,7 @@ final class DiffusionRepositoryEditEncodingController
|
||||
$object_box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText($title)
|
||||
->setForm($form)
|
||||
->setFormError($error_view);
|
||||
->setFormErrors($errors);
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
array(
|
||||
|
||||
@@ -33,13 +33,6 @@ final class DiffusionRepositoryEditLocalController
|
||||
|
||||
$title = pht('Edit %s', $repository->getName());
|
||||
|
||||
$error_view = null;
|
||||
if ($errors) {
|
||||
$error_view = id(new AphrontErrorView())
|
||||
->setTitle(pht('Form Errors'))
|
||||
->setErrors($errors);
|
||||
}
|
||||
|
||||
$form = id(new AphrontFormView())
|
||||
->setUser($user)
|
||||
->appendRemarkupInstructions(
|
||||
@@ -61,7 +54,7 @@ final class DiffusionRepositoryEditLocalController
|
||||
$object_box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText($title)
|
||||
->setForm($form)
|
||||
->setFormError($error_view);
|
||||
->setFormErrors($errors);
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
array(
|
||||
|
||||
Reference in New Issue
Block a user