Skip to content

Commit

Permalink
Merge pull request #1782 from mehul0810/issue/1773
Browse files Browse the repository at this point in the history
Issue/1773
  • Loading branch information
Devin Walker committed Jun 26, 2017
2 parents da99265 + 87a8e0e commit 845495e
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 4 deletions.
19 changes: 19 additions & 0 deletions assets/js/admin/admin-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,24 @@ jQuery.noConflict();
return price;
}

/**
* List donation screen JS
*/

var Give_List_Donation = {

init: function () {
this.delete_single_donation();
},

delete_single_donation: function () {
$('body').on('click', '.delete-single-donation', function (e) {
return confirm(give_vars.delete_payment);
});
}

}

/**
* Edit donation screen JS
*/
Expand Down Expand Up @@ -1745,6 +1763,7 @@ jQuery.noConflict();
enable_admin_datepicker();
handle_status_change();
setup_chosen_give_selects();
Give_List_Donation.init();
Give_Edit_Donation.init();
Give_Settings.init();
Give_Reports.init();
Expand Down
2 changes: 1 addition & 1 deletion assets/js/admin/admin-scripts.min.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/sourcemaps/give.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion includes/admin/payments/class-payments-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ function get_row_actions( $payment ) {

}

$actions['delete'] = sprintf( '<a href="%1$s" aria-label="%2$s">%3$s</a>', wp_nonce_url( add_query_arg( array(
$actions['delete'] = sprintf( '<a class="delete-single-donation" href="%1$s" aria-label="%2$s">%3$s</a>', wp_nonce_url( add_query_arg( array(
'give-action' => 'delete_payment',
'purchase_id' => $payment->ID,
), $this->base_url ), 'give_donation_nonce' ), sprintf( esc_attr__( 'Delete Donation %s', 'give' ), $payment->ID ), esc_html__( 'Delete', 'give' ) );
Expand Down

0 comments on commit 845495e

Please sign in to comment.