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")]);
|
||||
|
||||
$tabform->getTab("display")->selectBox(
|
||||
-name=>"defaultThingId",
|
||||
-value=>$self->get("defaultThingId"),
|
||||
-label=>$i18n->get("default thing label"),
|
||||
-options=>$things,
|
||||
);
|
||||
unless (scalar(keys(%{$things}))) {
|
||||
$tabform->getTab("display")->selectBox(
|
||||
-name=>"defaultThingId",
|
||||
-value=>$self->get("defaultThingId"),
|
||||
-label=>$i18n->get("default thing label"),
|
||||
-options=>$things,
|
||||
);
|
||||
}
|
||||
|
||||
return $tabform;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue