Page MenuHomePhorge

D25281.1737233455.diff
No OneTemporary

D25281.1737233455.diff

diff --git a/src/applications/pholio/controller/PholioInlineController.php b/src/applications/pholio/controller/PholioInlineController.php
--- a/src/applications/pholio/controller/PholioInlineController.php
+++ b/src/applications/pholio/controller/PholioInlineController.php
@@ -102,6 +102,7 @@
->addCancelButton($mock_uri, pht('Close'));
}
+ $error = null;
if ($request->isFormPost()) {
$v_content = $request->getStr('content');
@@ -112,9 +113,13 @@
} else if ($inline->getID()) {
$inline->delete();
$dictionary = array();
+ } else {
+ $error = pht('Comment cannot be empty.');
}
- return id(new AphrontAjaxResponse())->setContent($dictionary);
+ if ($error === null) {
+ return id(new AphrontAjaxResponse())->setContent($dictionary);
+ }
}
switch ($mode) {
@@ -151,6 +156,7 @@
->setUser($viewer)
->setName('content')
->setLabel(pht('Comment'))
+ ->setError($error)
->setValue($v_content));
return $this->newDialog()

File Metadata

Mime Type
text/plain
Expires
Sat, Jan 18, 20:50 (2 d, 4 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1108630
Default Alt Text
D25281.1737233455.diff (1 KB)

Event Timeline