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:
commit
770beb5cd5
3 changed files with 7 additions and 3 deletions
|
@ -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 {
|
||||
|
|
|
@ -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>'.
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue