1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 22:10:55 +01:00

Phurl URL object should show a banner if the URL is invalid

Summary: Ref T8989, Phurl URL should always show an info banner if the URL isn't valid

Test Plan: Phurl objects with URL "google.com" should show an error banner, but objects with URL "http://google.com" should not show banner.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T8989

Differential Revision: https://secure.phabricator.com/D14386
This commit is contained in:
lkassianik 2015-11-02 13:04:34 -08:00
parent 809453a3e1
commit 99daadb251

View file

@ -35,9 +35,13 @@ final class PhabricatorPhurlURLViewController
$properties = $this->buildPropertyView($url);
$properties->setActionList($actions);
$url_error = id(new PHUIInfoView())
->setErrors(array(pht('This URL is invalid due to a bad protocol.')))
->setIsHidden($url->isValid());
$box = id(new PHUIObjectBoxView())
->setHeader($header)
->addPropertyList($properties);
->addPropertyList($properties)
->setInfoView($url_error);
$is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business');
$add_comment_header = $is_serious