From: Zefram Date: Thu, 24 Apr 2014 16:42:35 +0000 (+0100) Subject: Save chest label when exiting formspec X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=593972b1561016b9fd700998b1ef0d48abd25eda;p=zefram%2Fminetest%2Ftechnic.git 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 to indicate that text editing is complete, which works with other text editing forms such as that for signs. --- diff --git a/technic_chests/register.lua b/technic_chests/register.lua index 765a9a5..204ca3c 100644 --- a/technic_chests/register.lua +++ b/technic_chests/register.lua @@ -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