Page MenuHomePhabricator

D11778.id.diff
No OneTemporary

D11778.id.diff

diff --git a/src/applications/conpherence/controller/ConpherenceNewController.php b/src/applications/conpherence/controller/ConpherenceNewController.php
--- a/src/applications/conpherence/controller/ConpherenceNewController.php
+++ b/src/applications/conpherence/controller/ConpherenceNewController.php
@@ -12,6 +12,7 @@
$message = '';
$e_participants = null;
$e_message = null;
+ $errors = array();
// this comes from ajax requests from all over. should be a single phid.
@@ -29,10 +30,15 @@
foreach ($error_codes as $error_code) {
switch ($error_code) {
case ConpherenceEditor::ERROR_EMPTY_MESSAGE:
- $e_message = true;
+ $e_message = pht('Required');
+ $errors[] = pht(
+ 'You can not send an empty message.');
break;
case ConpherenceEditor::ERROR_EMPTY_PARTICIPANTS:
- $e_participants = true;
+ $e_participants = pht('Required');
+ $errors[] = pht(
+ 'You must choose at least one recipient for your '.
+ 'message.');
break;
}
}
@@ -69,6 +75,7 @@
$dialog = id(new AphrontDialogView())
->setWidth(AphrontDialogView::WIDTH_FORM)
+ ->setErrors($errors)
->setUser($user)
->setTitle($title)
->addCancelButton($cancel_uri)

File Metadata

Mime Type
text/plain
Expires
Wed, Oct 30, 1:30 AM (3 w, 10 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6740068
Default Alt Text
D11778.id.diff (1 KB)

Event Timeline