mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-23 15:22:41 +01:00
workboards - make errors from filtering show up
Summary: Fixes T7252. The UI is slightly different than in Maniphest - in Maniphest the error shows up at the bottom and here it shows up the top - but I think the UI here makes sense as you see the error right away on the newly returned dialogue? Test Plan: set "created after" to "assdaasds" and got an error back. set filter to something that should work and it worked Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T7252 Differential Revision: https://secure.phabricator.com/D11760
This commit is contained in:
parent
ebcab8edb6
commit
e100961453
1 changed files with 13 additions and 0 deletions
|
@ -101,6 +101,19 @@ final class PhabricatorProjectBoardViewController
|
|||
if ($request->isFormPost()) {
|
||||
$saved = $engine->buildSavedQueryFromRequest($request);
|
||||
$engine->saveQuery($saved);
|
||||
$filter_form = id(new AphrontFormView())
|
||||
->setUser($viewer);
|
||||
$engine->buildSearchForm($filter_form, $saved);
|
||||
if ($engine->getErrors()) {
|
||||
return $this->newDialog()
|
||||
->setWidth(AphrontDialogView::WIDTH_FULL)
|
||||
->setTitle(pht('Advanced Filter'))
|
||||
->appendChild($filter_form->buildLayoutView())
|
||||
->setErrors($engine->getErrors())
|
||||
->setSubmitURI($board_uri)
|
||||
->addSubmitButton(pht('Apply Filter'))
|
||||
->addCancelButton($board_uri);
|
||||
}
|
||||
return id(new AphrontRedirectResponse())->setURI(
|
||||
$this->getURIWithState(
|
||||
$engine->getQueryResultsPageURI($saved->getQueryKey())));
|
||||
|
|
Loading…
Reference in a new issue