Revert "Promote phutil-tag again"

This reverts commit 8fbabdc06d, reversing
changes made to 2dab1c1e42.
This commit is contained in:
epriestley
2013-02-13 14:08:57 -08:00
parent 8fbabdc06d
commit 73cce6e131
264 changed files with 1717 additions and 1691 deletions

View File

@@ -143,7 +143,8 @@ extends PhabricatorAuthController {
// display time -- make a nice form for the user to grant the client
// access to the granularity specified by $scope
$title = 'Authorize '.$client->getName().'?';
$name = phutil_escape_html($client->getName());
$title = 'Authorize ' . $name . '?';
$panel = new AphrontPanelView();
$panel->setWidth(AphrontPanelView::WIDTH_FORM);
$panel->setHeader($title);

View File

@@ -32,13 +32,15 @@ extends PhabricatorOAuthClientBaseController {
->setURI('/oauthserver/client/?deleted=1');
}
$title .= ' '.$client->getName();
$client_name = phutil_escape_html($client->getName());
$title .= ' '.$client_name;
$dialog = new AphrontDialogView();
$dialog->setUser($current_user);
$dialog->setTitle($title);
$dialog->appendChild(phutil_tag('p', array(), pht(
'Are you sure you want to delete this client?')));
$dialog->appendChild(
'<p>Are you sure you want to delete this client?</p>'
);
$dialog->addSubmitButton();
$dialog->addCancelButton($client->getEditURI());
return id(new AphrontDialogResponse())->setDialog($dialog);

View File

@@ -113,8 +113,10 @@ extends PhabricatorOAuthClientBaseController {
$new = $this->getRequest()->getStr('new');
$deleted = $this->getRequest()->getBool('deleted');
if ($edited) {
$edited = phutil_escape_html($edited);
$title = 'Successfully edited client with id '.$edited.'.';
} else if ($new) {
$new = phutil_escape_html($new);
$title = 'Successfully created client with id '.$new.'.';
} else if ($deleted) {
$title = 'Successfully deleted client.';

View File

@@ -37,17 +37,20 @@ extends PhabricatorOAuthClientAuthorizationBaseController {
->loadOneWhere('phid = %s',
$client_phid);
if ($client) {
$title .= ' for '.$client->getName();
$client_name = phutil_escape_html($client->getName());
$title .= ' for '.$client_name;
} else {
// the client does not exist so token is dead already (but
// let's let the user clean this up anyway in that case)
$client_name = '';
}
$dialog = new AphrontDialogView();
$dialog->setUser($current_user);
$dialog->setTitle($title);
$dialog->appendChild(phutil_tag('p', array(), pht(
'Are you sure you want to delete this client authorization?')));
$dialog->appendChild(
'<p>Are you sure you want to delete this client authorization?</p>'
);
$dialog->addSubmitButton();
$dialog->addCancelButton($authorization->getEditURI());
return id(new AphrontDialogResponse())->setDialog($dialog);

View File

@@ -137,6 +137,7 @@ extends PhabricatorOAuthClientAuthorizationBaseController {
$edited = $this->getRequest()->getStr('edited');
$deleted = $this->getRequest()->getBool('deleted');
if ($edited) {
$edited = phutil_escape_html($edited);
$title = 'Successfully edited client authorization.';
} else if ($deleted) {
$title = 'Successfully deleted client authorization.';