Skip to content

Commit

Permalink
refactor(admin-tool): improve code formatting & add text translation i…
Browse files Browse the repository at this point in the history
  • Loading branch information
raftaar1191 committed Apr 2, 2018
1 parent 699fe7b commit eebc221
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions assets/src/js/admin/admin-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,13 @@ jQuery(document).ready(function ($) {

$( '.give-export-donations-hide' ).addClass( 'give-hidden' );

jQuery(document).trigger('give_export_donations_form_change' );
jQuery( document ).trigger( 'give_export_donations_form_change' );

var give_form_id;

// Check for form ID.
if ( ! (
give_form_id = $( this ).val()
) ) {
if ( ! ( give_form_id = $( this ).val() ) ) {
return false;

}

// Ajax.
Expand All @@ -179,15 +176,13 @@ jQuery(document).ready(function ($) {
action: 'give_export_donations_get_custom_fields'
},
success: function ( response ) {

if ( response ) {
output_give_donations_fields( response );

} else {
alert( 'An AJAX error occurred.' );
alert( give_vars.error_message );
}

jQuery(document).trigger('give_export_donations_form_response', response );
jQuery( document ).trigger( 'give_export_donations_form_response', response );
}
} );
} );
Expand Down

0 comments on commit eebc221

Please sign in to comment.