Differential D14718 Diff 35600 src/applications/transactions/controller/PhabricatorEditEngineConfigurationDefaultCreateController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/controller/PhabricatorEditEngineConfigurationDefaultCreateController.php
Show All 31 Lines | if ($request->isFormPost()) { | ||||
$editor->applyTransactions($config, $xactions); | $editor->applyTransactions($config, $xactions); | ||||
return id(new AphrontRedirectResponse()) | return id(new AphrontRedirectResponse()) | ||||
->setURI($cancel_uri); | ->setURI($cancel_uri); | ||||
} | } | ||||
if ($config->getIsDefault()) { | if ($config->getIsDefault()) { | ||||
$title = pht('Remove From "Create" Menu'); | $title = pht('Unmark as Create Form'); | ||||
$body = pht( | $body = pht( | ||||
'Remove this form from the application "Create" menu? It will still '. | 'Unmark this form as a create form? It will still function properly, '. | ||||
'function properly, but no longer be reachable directly from the '. | 'but no longer be reachable directly from the application "Create" '. | ||||
'application.'); | 'menu.'); | ||||
$button = pht('Remove From Menu'); | $button = pht('Unmark Form'); | ||||
} else { | } else { | ||||
$title = pht('Add To "Create" Menu'); | $title = pht('Mark as Create Form'); | ||||
$body = pht( | $body = pht( | ||||
'Add this form to the application "Create" menu? Users will '. | 'Mark this form as a create form? It will appear in the application '. | ||||
'be able to choose it when creating new objects.'); | '"Create" menus by default.'); | ||||
$button = pht('Add To Menu'); | $button = pht('Mark Form'); | ||||
} | } | ||||
return $this->newDialog() | return $this->newDialog() | ||||
->setTitle($title) | ->setTitle($title) | ||||
->appendParagraph($body) | ->appendParagraph($body) | ||||
->addSubmitButton($button) | ->addSubmitButton($button) | ||||
->addCancelbutton($cancel_uri); | ->addCancelbutton($cancel_uri); | ||||
} | } | ||||
} | } |