add-new-product-button.php
1 month ago
confirm-bulk-delete.php
2 years ago
edit.php
3 years ago
import-results.php
1 month ago
index.php
1 month ago
confirm-bulk-delete.php
75 lines
| 1 | <style> |
| 2 | #wpwrap { |
| 3 | --sc-color-primary-500: var(--sc-color-danger-500); |
| 4 | background: var(--sc-color-brand-main-background); |
| 5 | } |
| 6 | |
| 7 | .wrap .container { |
| 8 | width: 100%; |
| 9 | padding-top: 3em; |
| 10 | } |
| 11 | |
| 12 | .wrap .container sc-card { |
| 13 | width: 100%; |
| 14 | max-width: 600px; |
| 15 | } |
| 16 | |
| 17 | .sc-modal-icon { |
| 18 | font-size: 24px; |
| 19 | color: var(--sc-color-primary-500); |
| 20 | } |
| 21 | |
| 22 | .wrap .container .button-container { |
| 23 | gap: 1em; |
| 24 | } |
| 25 | |
| 26 | .sc-product-list { |
| 27 | font-size: 13px; |
| 28 | } |
| 29 | |
| 30 | .sc-product-list li a { |
| 31 | display: flex; |
| 32 | align-items: center; |
| 33 | gap: 0.5em; |
| 34 | color: var(--sc-color-primary-500); |
| 35 | } |
| 36 | |
| 37 | </style> |
| 38 | <div class="wrap"> |
| 39 | <?php \SureCart::render( 'layouts/partials/admin-index-styles' ); ?> |
| 40 | |
| 41 | <sc-flex justify-content="center" class="container"> |
| 42 | <sc-card style="--sc-card-padding: var(--sc-spacing-xxx-large)"> |
| 43 | <form action="" method="post"> |
| 44 | <?php wp_nonce_field( 'bulk_delete_nonce', 'nonce' ); ?> |
| 45 | <input type="hidden" name="confirm-bulk-delete" value="true" /> |
| 46 | <sc-flex flex-direction="column" style="--sc-flex-column-gap:1em;"> |
| 47 | <sc-icon name="alert-triangle" class="sc-modal-icon"></sc-icon> |
| 48 | |
| 49 | <sc-heading size="large"><?php esc_html_e( 'Delete Products', 'surecart' ); ?></sc-heading> |
| 50 | |
| 51 | <sc-text> |
| 52 | <?php echo esc_html( _n( 'Are you sure you want to permanently delete this product? This cannot be undone.', 'Are you sure you want to permanently delete these products? This cannot be undone.', count( $products ), 'surecart' ) ); ?> |
| 53 | </sc-text> |
| 54 | |
| 55 | <ul class="sc-product-list"> |
| 56 | <?php foreach ( $products as $product ) : ?> |
| 57 | <li> |
| 58 | <a href="<?php echo esc_url( \SureCart::getUrl()->edit( 'product', $product->id ) ); ?>" target="_blank"> |
| 59 | <?php echo wp_kses_post( $product->name ); ?> |
| 60 | <sc-icon name="external-link"></sc-icon> |
| 61 | </a> |
| 62 | </li> |
| 63 | <?php endforeach; ?> |
| 64 | </ul> |
| 65 | |
| 66 | <sc-flex class="button-container" justify-content="flex-start"> |
| 67 | <sc-button size="medium" type="primary" submit><?php esc_html_e( 'Delete', 'surecart' ); ?></sc-button> |
| 68 | <sc-button href="<?php echo esc_url( wp_get_referer() ? wp_get_referer() : get_home_url() ); ?>" size="medium" type="link"><?php esc_html_e( 'Cancel', 'surecart' ); ?></sc-button> |
| 69 | </sc-flex> |
| 70 | </sc-flex> |
| 71 | </form> |
| 72 | </sc-card> |
| 73 | </sc-flex> |
| 74 | </div> |
| 75 |