sveawebpay/magento-module — pull request #81 by danielholmstrom (2014-07-16 18:30:52+00:00)
Title: SVEA-13: Prevent users from editing addresses from svea

Prevents users from changing address information in addresses that
comes from svea or add a different shipping address in frontend. When
an address is fetched from svea it should not be possible to change
that information or choose a separate shipping address. In backend this
is already dealt with but not in frontend until now.

* If no address could be found all relevant fields are cleared.
* If another payment method is selected the address values will be cleared.
* When switching to svea payment the last address selected, if any, will be selected and the inputs will be populated.

The classes 'svea-hidden' and 'svea-readonly' are used to mark elements
as hidden and/or readonly. This is because magento has no
'payment-method-deselected' event which can be used to remove proper
'readonly' attributes on inputs and hide elements with. Since no such
event is available setting readonly/hiding elements might interfere with
other modules.

Css for the classes 'svea-hidden' and 'svea-readonly' is not included in
this commit.