This commit is contained in:
sriramv 2023-07-22 14:31:30 +05:30
parent 59622f4e62
commit 69645b2b6d

View File

@ -613,6 +613,8 @@ $web_payment_sdk_url = $_ENV["ENVIRONMENT"] === Environment::PRODUCTION ? "https
$('#card-button').prop("disabled", true);
$('#card-button').css("background-color", "gray");
$('.js-example-basic-single').select2();
var state_value = $('#state_value').val();
if(state_value == ''){ $('#state_value').val('Enter Province'); }
var country = $("#country").val();
if(country == 'Canada')
{
@ -629,10 +631,11 @@ $web_payment_sdk_url = $_ENV["ENVIRONMENT"] === Environment::PRODUCTION ? "https
$('#country').change(function() {
var country = $("#country").val();
$('#rememberMe').prop('checked', false);
if(country == 'Canada')
{
$('#state').attr('required', false);
$('#state').val($('#state_value').val());
$('#state').val($('#state_value').val());
$('#state2').attr('required', true);
$('#state_span_message').hide();
$('#state2_span_message').show();
@ -640,6 +643,7 @@ $web_payment_sdk_url = $_ENV["ENVIRONMENT"] === Environment::PRODUCTION ? "https
$('#state2').attr('required', false);
$('#state2').val($('#state_value').val());
$('#state').attr('required', true);
$('#state').val('');
$('#state2_span_message').hide();
$('#state_span_message').show();
}
@ -665,6 +669,7 @@ $web_payment_sdk_url = $_ENV["ENVIRONMENT"] === Environment::PRODUCTION ? "https
function ValidateForm() {
var formInvalid = false;
$('#member_address input,select').each(function() {
// alert($(this).val());
if ($(this).val() === '') {
var id = $(this).attr('id');
var input_id = id+'_span_message';