1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-20 12:30:56 +01:00

Hide auxiliary fields that have no value set

Reviewers: epriestly
This commit is contained in:
David Cramer 2011-12-16 16:31:02 -08:00
parent c3e1ab0751
commit 2a80bdd448
3 changed files with 7 additions and 3 deletions

View file

@ -107,7 +107,7 @@ class ConduitAPI_differential_getcommitmessage_Method extends ConduitAPIMethod {
foreach ($aux_fields as $field_key => $field) {
$value = $field->renderValueForCommitMessage($is_edit);
$label = $field->renderLabelForCommitMessage();
if ($value === null || !strlen($value)) {
if (!strlen($value)) {
if ($field_key === 'title') {
$commit_message[] = '<<Enter Revision Title>>';
} else {

View file

@ -53,7 +53,7 @@ final class DifferentialRevisionDetailView extends AphrontView {
$rows = array();
foreach ($this->auxiliaryFields as $field) {
$value = $field->renderValueForRevisionView();
if ($value !== null) {
if (strlen($value)) {
$label = $field->renderLabelForRevisionView();
$rows[] =
'<tr>'.

View file

@ -147,7 +147,11 @@ class ManiphestTaskDetailController extends ManiphestController {
$aux_field->setValue($attribute->getValue());
}
$dict[$aux_field->getLabel()] = $aux_field->renderForDetailView();
$value = $aux_field->renderForDetailView();
if (strlen($value)) {
$dict[$aux_field->getLabel()] = $value;
}
}
}