legacy: fix javascript on /record/edit

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

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