search-bar.php
| 1 | <?php |
| 2 | /** |
| 3 | * Search bar section. |
| 4 | * |
| 5 | * @var Hustle_Layout_Helper $this |
| 6 | * |
| 7 | * @package Hustle |
| 8 | * @since 4.0.0 |
| 9 | */ |
| 10 | |
| 11 | ?> |
| 12 | <div class="sui-box"> |
| 13 | |
| 14 | <div class="hui-box-entries-search"> |
| 15 | |
| 16 | <form id="hustle-entries-search-form" class="hui-search-left" method="get"> |
| 17 | |
| 18 | <input |
| 19 | type="hidden" |
| 20 | name="page" |
| 21 | value="hustle_entries" |
| 22 | /> |
| 23 | |
| 24 | <select |
| 25 | name="module_type" |
| 26 | class="sui-select sui-select-sm sui-select-inline" |
| 27 | onchange="submit()" |
| 28 | data-width="150" |
| 29 | > |
| 30 | <?php foreach ( $this->admin->get_module_types() as $module_type => $name ) { ?> |
| 31 | <option value="<?php echo esc_attr( $module_type ); ?>" <?php echo selected( $module_type, $this->admin->get_current_module_type() ); ?>><?php echo esc_html( $name ); ?></option> |
| 32 | <?php } ?> |
| 33 | </select> |
| 34 | |
| 35 | <?php echo $this->admin->render_module_switcher(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> |
| 36 | |
| 37 | <button class="sui-button sui-button-blue" onclick="submit()"> |
| 38 | <?php esc_html_e( 'Show Email List', 'hustle' ); ?> |
| 39 | </button> |
| 40 | |
| 41 | </form> |
| 42 | |
| 43 | <?php if ( $has_entries ) : ?> |
| 44 | |
| 45 | <div class="hui-search-right"> |
| 46 | |
| 47 | <form method="post"> |
| 48 | <input type="hidden" name="hustle_action" value="export_listing"> |
| 49 | <input type="hidden" name="id" value="<?php echo esc_attr( $module->id ); ?>"> |
| 50 | <?php wp_nonce_field( 'hustle_module_export_listing' ); ?> |
| 51 | <button class="sui-button sui-button-ghost"> |
| 52 | <span class="sui-icon-paperclip" aria-hidden="true"></span> |
| 53 | <?php esc_html_e( 'Export CSV', 'hustle' ); ?> |
| 54 | </button> |
| 55 | </form> |
| 56 | |
| 57 | </div> |
| 58 | |
| 59 | <?php endif; ?> |
| 60 | |
| 61 | </div> |
| 62 | |
| 63 | </div> |
| 64 |