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

Merge pull request #85 from dcramer/hide-empty-fields-in-maniphest

Hide auxiliary fields that have no value set
This commit is contained in:
Evan Priestley 2011-12-16 16:51:58 -08:00
commit 770beb5cd5
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;
}
}
}