On index.php, change the functionality of your update button's click event so that:
another two buttons appear on the same row AFTER the newly converted textbox field. The first one says "save" and the second one says "cancel".
I don't see why you need to write the original message to a hidden div - this can be stored in a js variable. A reset or restore button can just take that value from the var and overwrite the textbox value. Or am I missing something?