Restore the patch to fix creating tables unwisely in the Thingy. Fixes numerous bugs due to a bad merge.
This commit is contained in:
parent
8b13c387be
commit
8978abc471
1 changed files with 7 additions and 6 deletions
|
|
@ -866,15 +866,15 @@ sub getEditFieldForm {
|
|||
-value=>$field->{fieldType} || "Text",
|
||||
-options=>\%fieldTypes,
|
||||
-id=>$dialogPrefix."_fieldType_formId",
|
||||
);
|
||||
);
|
||||
|
||||
$f->yesNo(
|
||||
-name=>'isUnique',
|
||||
-label=>$i18n->get('unique label'),
|
||||
-hoverHelp=>$i18n->get('unique description'),
|
||||
-hoverHelp=>$i18n->get('unique description'),
|
||||
-value=>$field->{isUnique},
|
||||
-id=>$dialogPrefix."_isUnique_formId",
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
$f->raw($self->getHtmlWithModuleWrapper($dialogPrefix."_fieldInThing_module"));
|
||||
|
|
@ -2083,7 +2083,7 @@ sub www_editThing {
|
|||
maxEntriesPerUser=>undef,
|
||||
maxEntriesTotal=>undef,
|
||||
);
|
||||
$thingId = $self->addThing(\%properties,0);
|
||||
$thingId = "new";
|
||||
}
|
||||
else{
|
||||
%properties = %{$self->getThing($thingId)};
|
||||
|
|
@ -2614,13 +2614,14 @@ sub www_editFieldSave {
|
|||
$defaultValue = $session->form->process("defaultFieldInThing");
|
||||
}
|
||||
|
||||
$thingId = $self->addThing({ thingId => 'new' },0) if $thingId eq 'new';
|
||||
$fieldId = $session->form->process("fieldId");
|
||||
%properties = (
|
||||
fieldId => $fieldId,
|
||||
thingId => $thingId,
|
||||
label => $label,
|
||||
fieldType => $fieldType,
|
||||
isUnique => $uniqueField,
|
||||
isUnique => $uniqueField,
|
||||
defaultValue => $defaultValue,
|
||||
possibleValues => $session->form->process("possibleValues"),
|
||||
pretext => $session->form->process("pretext"),
|
||||
|
|
@ -2678,7 +2679,7 @@ sub www_editFieldSave {
|
|||
# Make sure we send debug information along with the field.
|
||||
$log->preventDebugOutput;
|
||||
|
||||
$session->output->print($newFieldId.$listItemHTML);
|
||||
$session->output->print($thingId.$newFieldId.$listItemHTML);
|
||||
return "chunked";
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue