WIP commit: updates to form JS & layout improvements for training grouping support; pdf+show layout fixed; edit action not working yet; new vers. 4.00.169