Cover the case when we don't revert changes

Instead of using undefined variable.
Plus, rename the url variable to a more explicit name.
(cherry picked from commit 676d8c3)
Don't make ajax request for provinces if contry value is empty
(cherry picked from commit b82e104)