ticket:6 fixed js troubles
ajax and calendar handlers moved to form template