diff --git a/app/Controllers/Member_controller.php b/app/Controllers/Member_controller.php index c7ceeed..f2eae4e 100644 --- a/app/Controllers/Member_controller.php +++ b/app/Controllers/Member_controller.php @@ -413,7 +413,7 @@ class Member_controller extends BaseController ->where('md5(member.id)', $member_id ) ->find(); - +// print_r($data['Memberdata']);die(); $data['country'] = $this->CountryModel->findAll(); diff --git a/app/Models/User_model.php b/app/Models/User_model.php index 86df372..8a8c1f4 100644 --- a/app/Models/User_model.php +++ b/app/Models/User_model.php @@ -7,7 +7,7 @@ class User_model extends Model protected $table = 'users'; protected $primaryKey = 'id'; - protected $allowedFields = ['role','name', 'mobile', 'profile' , 'email', 'password', 'address' , 'city' , 'state' , 'country' , 'pincode' , 'new_mail' , 'is_active' ,'created_at','updated_at']; + protected $allowedFields = ['role','name', 'mobile', 'profile' , 'email', 'password', 'address' , 'city' , 'state' , 'country' , 'pincode' , 'new_mail' , 'is_active' ,'created_at','updated_at','country_code']; protected $beforeInsert = ['beforeInsert']; protected $beforeUpdate = ['beforeUpdate']; diff --git a/app/Views/checkout.php b/app/Views/checkout.php index 1c92f57..b3da5fa 100644 --- a/app/Views/checkout.php +++ b/app/Views/checkout.php @@ -375,7 +375,7 @@ $web_payment_sdk_url = $_ENV["ENVIRONMENT"] === Environment::PRODUCTION ? "https
- +
@@ -623,6 +623,7 @@ $web_payment_sdk_url = $_ENV["ENVIRONMENT"] === Environment::PRODUCTION ? "https $(document).ready(function() { $('#card-button').prop("disabled", true); + $('#card-button').css("background-color", "gray"); $('.js-example-basic-single').select2(); }); @@ -639,6 +640,7 @@ $web_payment_sdk_url = $_ENV["ENVIRONMENT"] === Environment::PRODUCTION ? "https ValidateForm(); }else { $('#card-button').prop("disabled", true); + $('#card-button').css("background-color", "gray"); } }); @@ -657,7 +659,7 @@ $web_payment_sdk_url = $_ENV["ENVIRONMENT"] === Environment::PRODUCTION ? "https if (formInvalid) { $('#rememberMe').prop('checked', false);} - else{ $("#card-button").removeAttr('disabled'); } + else{ $("#card-button").removeAttr('disabled'); $('#card-button').css("background-color", "#00B4D5"); } } @@ -669,7 +671,7 @@ $web_payment_sdk_url = $_ENV["ENVIRONMENT"] === Environment::PRODUCTION ? "https $('#country').keyup(function() {$('#country_span_message').html(''); if($('#country').val().length == 0){uncheck() }}); $('#pincode').keyup(function() {$('#pincode_span_message').html(''); if($('#pincode').val().length == 0){uncheck() }}); - function uncheck(){ $('#rememberMe').prop('checked', false); $('#card-button').prop("disabled", true); } + function uncheck(){ $('#rememberMe').prop('checked', false); $('#card-button').prop("disabled", true); $('#card-button').css("background-color", "gray"); } diff --git a/app/Views/member_form.php b/app/Views/member_form.php index 29678e1..65c5f70 100644 --- a/app/Views/member_form.php +++ b/app/Views/member_form.php @@ -19,100 +19,8 @@ - - -
@@ -146,7 +54,10 @@ $(document).ready(function() { - + + + +
@@ -165,8 +76,8 @@ $(document).ready(function() {
- - + +
@@ -233,7 +144,7 @@ $(document).ready(function() {
-
- + +
@@ -73,8 +74,8 @@
- - + +
@@ -198,11 +199,11 @@ $(document).ready(function(){ } }); }); - -$(document).ready(function() { - var country_code = $('#country_code').val(); +var country_code = $('#country_code_get').val(); + //alert(country_code); var input = document.querySelector("#mobile"); - window.intlTelInput(input, { + + var iti = window.intlTelInput(input, { // allowDropdown: false, autoInsertDialCode: true, // autoPlaceholder: "on", @@ -227,7 +228,15 @@ $(document).ready(function() { utilsScript: "assets/member_js/utils.js" }); $('#mobile').inputmask('(999)-999-9999'); -}); + + + +function get_country_code() +{ + var countryCode = iti.getSelectedCountryData().iso2; + //alert(countryCode); + $('#country_code_post').val(countryCode); +}