legacy: fix javascript on /record/edit

* Addresses issue with record editor not loading record data.
  (closes #2143)

Co-authored-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Signed-off-by: Petr Broz <petr.broz@gmail.com>