Move PHUIErrorView to PHUIInfoView
Summary: Since this element isn't strictly about errors, re-label as info view instead. Test Plan: Grepped for all callsites, tested UIExamples and a few other random pages. Reviewers: btrahan, epriestley Reviewed By: epriestley Subscribers: hach-que, Korvin, epriestley Differential Revision: https://secure.phabricator.com/D11867
This commit is contained in:
@@ -93,7 +93,7 @@ final class PHUIObjectBoxView extends AphrontView {
|
||||
|
||||
public function setFormErrors(array $errors, $title = null) {
|
||||
if ($errors) {
|
||||
$this->formErrors = id(new PHUIErrorView())
|
||||
$this->formErrors = id(new PHUIInfoView())
|
||||
->setTitle($title)
|
||||
->setErrors($errors);
|
||||
}
|
||||
@@ -105,15 +105,15 @@ final class PHUIObjectBoxView extends AphrontView {
|
||||
$text = pht('Changes saved.');
|
||||
}
|
||||
if ($saved) {
|
||||
$save = id(new PHUIErrorView())
|
||||
->setSeverity(PHUIErrorView::SEVERITY_NOTICE)
|
||||
$save = id(new PHUIInfoView())
|
||||
->setSeverity(PHUIInfoView::SEVERITY_NOTICE)
|
||||
->appendChild($text);
|
||||
$this->formSaved = $save;
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setErrorView(PHUIErrorView $view) {
|
||||
public function setErrorView(PHUIInfoView $view) {
|
||||
$this->errorView = $view;
|
||||
return $this;
|
||||
}
|
||||
@@ -192,7 +192,7 @@ final class PHUIObjectBoxView extends AphrontView {
|
||||
$messages[] = $error->getMessage();
|
||||
}
|
||||
if ($messages) {
|
||||
$exception_errors = id(new PHUIErrorView())
|
||||
$exception_errors = id(new PHUIInfoView())
|
||||
->setErrors($messages);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user