Fix for autofocus in admin panel.

Hi,

Fix for script used in admin panel.
In case of bad input first input field with error should be focused,
but if there is no error - default autofucus should work.