hide default thing until there are things to list
This commit is contained in:
parent
6471d3103e
commit
e9853fdf5c
1 changed files with 8 additions and 6 deletions
|
|
@ -526,12 +526,14 @@ sub getEditForm {
|
||||||
|
|
||||||
my $things = $self->session->db->buildHashRef('select thingId, label from Thingy_things where assetId = ?',[$self->get("assetId")]);
|
my $things = $self->session->db->buildHashRef('select thingId, label from Thingy_things where assetId = ?',[$self->get("assetId")]);
|
||||||
|
|
||||||
$tabform->getTab("display")->selectBox(
|
unless (scalar(keys(%{$things}))) {
|
||||||
-name=>"defaultThingId",
|
$tabform->getTab("display")->selectBox(
|
||||||
-value=>$self->get("defaultThingId"),
|
-name=>"defaultThingId",
|
||||||
-label=>$i18n->get("default thing label"),
|
-value=>$self->get("defaultThingId"),
|
||||||
-options=>$things,
|
-label=>$i18n->get("default thing label"),
|
||||||
);
|
-options=>$things,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return $tabform;
|
return $tabform;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue