fix: reset form button not resetting lock

-> Added resetLock function to reset lock status
-> fixed reset form button not resetting the lock
-> Moved event handlers inside registerOnload

Signed-off-by: Chirayu Chiripal <chirayu.chiripal@gmail.com>