spree/spree — pull request #3165 by sohara (2013-06-06 16:08:59+00:00)
Title: Ensure correct classes on stateSelect, stateInput elements in checkout.js

On the frontend we have js that toggles visibility of the state text inputs and selects depending on whether the selected country has associated states. By default the state text input has the class 'hidden' assigned to it. Currently there is no 'hidden' class in the frontend css but many sites use a '.hidden' selector to apply display:none. Therefore when the stateInput visibility is toggled the presence of the 'hidden' class should be as well.

Additionally the validate.js plugin uses the .required class to determine whether that form element should be validated. I've also toggled the presence of the 'required' class as necessary.