Save chest label when exiting formspec

When using the form to edit a chest label, apply the edited label whenever the
form is submitted with the text field included, rather than only if the form's
specific "finished editing" button is used.  This supports the natural use of
<ret> to indicate that text editing is complete, which works with other text
editing forms such as that for signs.
This commit is contained in:
Zefram 2014-04-24 17:42:35 +01:00 committed by ShadowNinja
parent 628a18977b
commit 593972b156

View File

@ -69,7 +69,7 @@ local function get_receive_fields(name, data)
if fields.edit_infotext then
page = "edit_infotext"
end
if fields.save_infotext then
if fields.infotext_box then
meta:set_string("infotext", fields.infotext_box)
end
local formspec = data.formspec