Fix multiple issues with how Thingy handles default values, and values that are false. Fixes bug #12362
This commit is contained in:
parent
56e8240006
commit
b37f9d581d
2 changed files with 7 additions and 5 deletions
|
|
@ -4,7 +4,7 @@
|
||||||
- fixed: Threads with no posts return the wrong lastReply data.
|
- fixed: Threads with no posts return the wrong lastReply data.
|
||||||
- fixed #12339: Upgrade to 7.10 causes metadata values to "disappear" (Dale Trexel)
|
- fixed #12339: Upgrade to 7.10 causes metadata values to "disappear" (Dale Trexel)
|
||||||
- Upgraded TinyMCE to 3.5.6
|
- Upgraded TinyMCE to 3.5.6
|
||||||
|
- fixed #12362: Thingy default Y/N field overly default
|
||||||
|
|
||||||
7.10.26
|
7.10.26
|
||||||
- fixed: Template diagnostics when called without a session asset.
|
- fixed: Template diagnostics when called without a session asset.
|
||||||
|
|
|
||||||
|
|
@ -1132,7 +1132,8 @@ sub getFormPlugin {
|
||||||
$param{name} = "field_".$data->{fieldId};
|
$param{name} = "field_".$data->{fieldId};
|
||||||
my $name = $param{name};
|
my $name = $param{name};
|
||||||
$name =~ s/\^.*?\;//xgs ; # remove macro's from user input
|
$name =~ s/\^.*?\;//xgs ; # remove macro's from user input
|
||||||
$param{value} = $data->{value} || $data->{defaultValue};
|
#$param{value} = $data->{value} || $data->{defaultValue};
|
||||||
|
$param{value} = $data->{value};
|
||||||
$param{size} = $data->{size};
|
$param{size} = $data->{size};
|
||||||
$param{height} = $data->{height};
|
$param{height} = $data->{height};
|
||||||
$param{width} = $data->{width};
|
$param{width} = $data->{width};
|
||||||
|
|
@ -1174,10 +1175,10 @@ sub getFormPlugin {
|
||||||
|
|
||||||
if ($data->{fieldType} eq "YesNo") {
|
if ($data->{fieldType} eq "YesNo") {
|
||||||
if ($data->{defaultValue} =~ /yes/xi) {
|
if ($data->{defaultValue} =~ /yes/xi) {
|
||||||
$param{value} = 1;
|
$param{defaultValue} = 1;
|
||||||
}
|
}
|
||||||
elsif ($data->{defaultValue} =~ /no/xi) {
|
elsif ($data->{defaultValue} =~ /no/xi) {
|
||||||
$param{value} = 0;
|
$param{defaultValue} = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2881,7 +2882,8 @@ sub editThingData {
|
||||||
$fieldValue = $thingData{"field_".$field{fieldId}};
|
$fieldValue = $thingData{"field_".$field{fieldId}};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$field{value} = $fieldValue || $field{defaultValue};
|
#$field{value} = $fieldValue || $field{defaultValue};
|
||||||
|
$field{value} = $fieldValue;
|
||||||
my $formElement .= $self->getFormPlugin(\%field,($resetForm eq ""))->toHtml;
|
my $formElement .= $self->getFormPlugin(\%field,($resetForm eq ""))->toHtml;
|
||||||
|
|
||||||
my $hidden = ($field{status} eq "hidden" && !$self->session->var->isAdminOn);
|
my $hidden = ($field{status} eq "hidden" && !$self->session->var->isAdminOn);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue