Skip to content

Commit

Permalink
Merge pull request #62 from WordImpress/release/1.8.12
Browse files Browse the repository at this point in the history
Release/1.8.12
  • Loading branch information
mehul0810 committed Jul 15, 2017
2 parents 73ae825 + f42d795 commit 9e5bf30
Show file tree
Hide file tree
Showing 42 changed files with 1,571 additions and 346 deletions.
13 changes: 13 additions & 0 deletions assets/css/give-admin-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -1153,6 +1153,19 @@ ASIDE
#give-export-payments div.chosen-container:first-of-type {
margin-top: 10px; }

#give-export-payments div.chosen-container ul.chosen-choices {
border: 1px solid #ddd; }
#give-export-payments div.chosen-container ul.chosen-choices input.chosen-search-input {
border: 1px solid #ddd;
height: 20px; }

#give-export-payments select {
vertical-align: inherit;
margin: 0;
height: 26px;
line-height: 26px;
border: 1px solid #ddd; }

/*-------------------------------------
Doc Links
-------------------------------------*/
Expand Down
2 changes: 1 addition & 1 deletion assets/css/give-admin-rtl.min.css

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions assets/css/give-admin.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/css/give-admin.min.css

Large diffs are not rendered by default.

20 changes: 9 additions & 11 deletions assets/js/admin/admin-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,14 +284,13 @@ jQuery.noConflict();

state_wrap.find( '*' ).not( '.order-data-address-line' ).remove();

if ( 'nostates' == response ) {
state_wrap.append( '<input type="text" name="give-payment-address[0][state]" value="" class="give-edit-toggles medium-text"/>' );
} else {
state_wrap.append( response );
state_wrap.find( 'select' ).chosen();
}
if( typeof ( response.states_found ) != undefined && true == response.states_found ) {
state_wrap.append( response.data );
state_wrap.find( 'select' ).chosen();
} else {
state_wrap.append( '<input type="text" name="give-payment-address[0][state]" value="" class="give-edit-toggles medium-text"/>' );
}
} );

return false;
} );

Expand Down Expand Up @@ -922,13 +921,12 @@ jQuery.noConflict();
field_name: 'customerinfo[state]'
};
$.post( ajaxurl, data, function( response ) {
if ( 'nostates' === response ) {
$( ':input[name="customerinfo[state]"]' ).replaceWith( '<input type="text" name="' + data.field_name + '" value="" class="give-edit-toggles medium-text"/>' );
if( typeof ( response.states_found ) != undefined && true == response.states_found ) {
$( ':input[name="customerinfo[state]"]' ).replaceWith( response.data );
} else {
$( ':input[name="customerinfo[state]"]' ).replaceWith( response );
$( ':input[name="customerinfo[state]"]' ).replaceWith( '<input type="text" name="' + data.field_name + '" value="" class="give-edit-toggles medium-text"/>' );
}
} );

return false;
} );
},
Expand Down
2 changes: 1 addition & 1 deletion assets/js/admin/admin-scripts.min.js

Large diffs are not rendered by default.

15 changes: 10 additions & 5 deletions assets/js/frontend/give-ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,20 +88,25 @@ jQuery(document).ready(function ($) {
give_user_pass: this_form.find('[name=give_user_pass]').val()
};

$.post(give_global_vars.ajaxurl, data, function (data) {

$.post(give_global_vars.ajaxurl, data, function (response) {
//user is logged in
if ($.trim(data) == 'success') {
if ( $.trim( typeof ( response.success ) ) != undefined && response.success == true && typeof ( response.data ) != undefined ) {

//remove errors
this_form.find('.give_errors').remove();
//reload the selected gateway so it contains their logged in information

// Login successfully message.
this_form.find( '#give-payment-mode-select' ).after( response.data );
this_form.find( '.give_notices.give_errors' ).delay(5000).slideUp();

//reload the selected gateway so it contains their logged in information
give_load_gateway(this_form, this_form.find('.give-gateway-option-selected input').val());
} else {
//Login failed, show errors
this_form.find('[id^=give-login-fields] input[type=submit]').val(complete_purchase_val);
this_form.find('.give-loading-animation').fadeOut();
this_form.find('.give_errors').remove();
this_form.find('[id^=give-user-login-submit]').before(data);
this_form.find('[id^=give-user-login-submit]').before( response.data );
}
});

Expand Down
2 changes: 1 addition & 1 deletion assets/js/frontend/give-ajax.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 12 additions & 4 deletions assets/js/frontend/give-checkout-global.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,20 @@ jQuery(function ($) {
withCredentials: true
},
success : function (response) {
if ('nostates' == response) {
var text_field = '<input type="text" id="card_state" name="card_state" class="cart-state give-input required" value=""/>';
$form.find('input[name="card_state"], select[name="card_state"]').replaceWith(text_field);
if( typeof ( response.states_found ) != undefined && true == response.states_found ) {
$form.find('input[name="card_state"], select[name="card_state"]').replaceWith( response.data );
} else {
var text_field = '<input type="text" id="card_state" name="card_state" class="cart-state give-input required" value=""/>';
$form.find('input[name="card_state"], select[name="card_state"]').replaceWith(text_field);
}

// Check if user want to show the feilds or not.
if( typeof ( response.show_field ) != undefined && true == response.show_field ) {
$form.find( 'p#give-card-state-wrap' ).removeClass( 'give-hidden' );
} else {
$form.find('input[name="card_state"], select[name="card_state"]').replaceWith(response);
$form.find( 'p#give-card-state-wrap' ).addClass( 'give-hidden' );
}

doc.trigger('give_checkout_billing_address_updated', [response, $form.attr('id')]);
}
}).fail(function (data) {
Expand Down
Loading

0 comments on commit 9e5bf30

Please sign in to comment.