memTypeId was previously "undefined" after trying to read attribute
"membership-type". The DOM shows an attribute
"data-membership-type-id" and this patch modifies the attribute read
to "data-membership-type-id", which is also consistent with the
variable name in the code.
var priceSetName = "price_"+{/literal}'{$membershipFieldID}'{literal};
var considerUserInput = {/literal}'{$takeUserSubmittedAutoRenew}'{literal};
if ( memTypeId ) considerUserInput = false;
- if ( !memTypeId ) memTypeId = cj('input:radio[name='+priceSetName+']:checked').attr('membership-type');
+ if ( !memTypeId ) memTypeId = cj('input:radio[name='+priceSetName+']:checked').data('membership-type-id');
//does this page has only one membership type.
var renewOptions = {/literal}{$autoRenewMembershipTypeOptions}{literal};