Page MenuHomePhabricator

D10578.id25413.diff
No OneTemporary

D10578.id25413.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -28,7 +28,6 @@
'rsrc/css/aphront/pager-view.css' => '2e3539af',
'rsrc/css/aphront/panel-view.css' => '5846dfa2',
'rsrc/css/aphront/phabricator-nav-view.css' => '9283c2df',
- 'rsrc/css/aphront/request-failure-view.css' => '7a83dc3a',
'rsrc/css/aphront/table-view.css' => 'b22b7216',
'rsrc/css/aphront/tokenizer.css' => '82ce2142',
'rsrc/css/aphront/tooltip.css' => '9c90229d',
@@ -506,7 +505,6 @@
'aphront-multi-column-view-css' => '1b95ab2e',
'aphront-pager-view-css' => '2e3539af',
'aphront-panel-view-css' => '5846dfa2',
- 'aphront-request-failure-view-css' => '7a83dc3a',
'aphront-table-view-css' => 'b22b7216',
'aphront-tokenizer-control-css' => '82ce2142',
'aphront-tooltip-css' => '9c90229d',
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -79,7 +79,6 @@
'AphrontRedirectResponseTestCase' => 'aphront/response/__tests__/AphrontRedirectResponseTestCase.php',
'AphrontReloadResponse' => 'aphront/response/AphrontReloadResponse.php',
'AphrontRequest' => 'aphront/AphrontRequest.php',
- 'AphrontRequestFailureView' => 'view/page/AphrontRequestFailureView.php',
'AphrontRequestTestCase' => 'aphront/__tests__/AphrontRequestTestCase.php',
'AphrontResponse' => 'aphront/response/AphrontResponse.php',
'AphrontSideNavFilterView' => 'view/layout/AphrontSideNavFilterView.php',
@@ -2923,7 +2922,6 @@
'AphrontRedirectResponse' => 'AphrontResponse',
'AphrontRedirectResponseTestCase' => 'PhabricatorTestCase',
'AphrontReloadResponse' => 'AphrontRedirectResponse',
- 'AphrontRequestFailureView' => 'AphrontView',
'AphrontRequestTestCase' => 'PhabricatorTestCase',
'AphrontSideNavFilterView' => 'AphrontView',
'AphrontStackTraceView' => 'AphrontView',
diff --git a/src/aphront/response/Aphront403Response.php b/src/aphront/response/Aphront403Response.php
--- a/src/aphront/response/Aphront403Response.php
+++ b/src/aphront/response/Aphront403Response.php
@@ -19,16 +19,23 @@
$forbidden_text = $this->getForbiddenText();
if (!$forbidden_text) {
$forbidden_text =
- 'You do not have privileges to access the requested page.';
+ pht('You do not have privileges to access the requested page.');
}
- $failure = new AphrontRequestFailureView();
- $failure->setHeader('403 Forbidden');
- $failure->appendChild(phutil_tag('p', array(), $forbidden_text));
-
- $view = new PhabricatorStandardPageView();
- $view->setTitle('403 Forbidden');
- $view->setRequest($this->getRequest());
- $view->appendChild($failure);
+
+ $request = $this->getRequest();
+ $user = $request->getUser();
+
+ $dialog = id(new AphrontDialogView())
+ ->setUser($user)
+ ->setTitle(pht('403 Forbidden'))
+ ->addCancelButton('/', pht('Peace Out'))
+ ->appendParagraph($forbidden_text);
+
+ $view = id(new PhabricatorStandardPageView())
+ ->setTitle(pht('403 Forbidden'))
+ ->setRequest($request)
+ ->setDeviceReady(true)
+ ->appendChild($dialog);
return $view->render();
}
diff --git a/src/aphront/response/Aphront404Response.php b/src/aphront/response/Aphront404Response.php
--- a/src/aphront/response/Aphront404Response.php
+++ b/src/aphront/response/Aphront404Response.php
@@ -7,16 +7,22 @@
}
public function buildResponseString() {
- $failure = id(new AphrontRequestFailureView())
- ->setHeader(pht('404 Not Found'))
- ->appendChild(phutil_tag('p', array(), pht(
- 'The page you requested was not found.')));
+ $request = $this->getRequest();
+ $user = $request->getUser();
+
+ $dialog = id(new AphrontDialogView())
+ ->setUser($user)
+ ->setTitle(pht('404 Not Found'))
+ ->addCancelButton('/', pht('Focus'))
+ ->appendParagraph(pht(
+ 'Do not dwell in the past, do not dream of the future, '.
+ 'concentrate the mind on the present moment.'));
$view = id(new PhabricatorStandardPageView())
->setTitle('404 Not Found')
- ->setRequest($this->getRequest())
+ ->setRequest($request)
->setDeviceReady(true)
- ->appendChild($failure);
+ ->appendChild($dialog);
return $view->render();
}
diff --git a/src/applications/auth/controller/PhabricatorDisabledUserController.php b/src/applications/auth/controller/PhabricatorDisabledUserController.php
--- a/src/applications/auth/controller/PhabricatorDisabledUserController.php
+++ b/src/applications/auth/controller/PhabricatorDisabledUserController.php
@@ -14,16 +14,19 @@
return new Aphront404Response();
}
- $failure_view = new AphrontRequestFailureView();
- $failure_view->setHeader(pht('Account Disabled'));
- $failure_view->appendChild(phutil_tag('p', array(), pht(
- 'Your account has been disabled.')));
+ $dialog = id(new AphrontDialogView())
+ ->setUser($user)
+ ->setTitle(pht('Account Disabled'))
+ ->addCancelButton('/', pht('Okay'))
+ ->appendParagraph(pht('Your account has been disabled.'));
- return $this->buildStandardPageResponse(
- $failure_view,
- array(
- 'title' => pht('Account Disabled'),
- ));
+ $view = id(new PhabricatorStandardPageView())
+ ->setTitle(pht('Account Disabled'))
+ ->setRequest($request)
+ ->setDeviceReady(true)
+ ->appendChild($dialog);
+
+ return $view->render();
}
}
diff --git a/src/view/page/AphrontRequestFailureView.php b/src/view/page/AphrontRequestFailureView.php
deleted file mode 100644
--- a/src/view/page/AphrontRequestFailureView.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-final class AphrontRequestFailureView extends AphrontView {
-
- private $header;
-
- public function setHeader($header) {
- $this->header = $header;
- return $this;
- }
-
-
- final public function render() {
- require_celerity_resource('aphront-request-failure-view-css');
-
- $head = phutil_tag_div(
- 'aphront-request-failure-head',
- phutil_tag('h1', array(), $this->header));
-
- $body = phutil_tag_div(
- 'aphront-request-failure-body',
- $this->renderChildren());
-
- return phutil_tag_div('aphront-request-failure-view', array($head, $body));
- }
-
-}
diff --git a/webroot/rsrc/css/aphront/request-failure-view.css b/webroot/rsrc/css/aphront/request-failure-view.css
deleted file mode 100644
--- a/webroot/rsrc/css/aphront/request-failure-view.css
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * @provides aphront-request-failure-view-css
- */
-
-.aphront-request-failure-view {
- margin: 16px auto;
- background: #eff2f7;
- width: 600px;
-}
-
-.device .aphront-request-failure-view {
- width: 90%;
-}
-
-.aphront-request-failure-view .aphront-request-failure-head {
- padding: 1em 2em;
- border-bottom: 1px solid #afb2b7;
- background: #dfe2e7;
-}
-
-.aphront-request-failure-view .aphront-request-failure-head h1 {
- font-size: 24px;
-}
-
-.aphront-request-failure-view .aphront-request-failure-body {
- padding: 1em 2em 1.5em;
-}
-
-.aphront-request-failure-view .aphront-request-failure-body p {
- margin: .5em 0;
-}
-
-.aphront-failure-continue {
- margin-top: 1.5em;
- text-align: right;
-}
-
-.aphront-failure-continue a.button {
- margin-left: 1em;
-}
-
-.aphront-request-failure-view ul {
- list-style: disc;
- margin-left: 3em;
-}

File Metadata

Mime Type
text/plain
Expires
Tue, Jan 28, 3:05 AM (7 h, 39 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7062923
Default Alt Text
D10578.id25413.diff (7 KB)

Event Timeline