Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue/1773 #1782

Merged
merged 4 commits into from
Jun 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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