settings.php
60 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Dashboard widget settings gear icon template. |
| 4 | * |
| 5 | * @since 1.7.4 |
| 6 | * |
| 7 | * @var int $graph_style Graph style, value 1 for Bar style, 2 for Line style. |
| 8 | * @var int $color_scheme Color scheme, value 1 for WPForms color scheme, 2 for for WordPress color scheme. |
| 9 | * @var bool $enabled If form fields should be enabled. |
| 10 | */ |
| 11 | |
| 12 | if ( ! defined( 'ABSPATH' ) ) { |
| 13 | exit; |
| 14 | } |
| 15 | |
| 16 | $disabled = ! $enabled; |
| 17 | |
| 18 | ?> |
| 19 | <div class="wpforms-dash-widget-settings-container"> |
| 20 | <button id="wpforms-dash-widget-settings-button" class="wpforms-dash-widget-settings-button button" type="button"> |
| 21 | <span class="dashicons dashicons-admin-generic"></span> |
| 22 | </button> |
| 23 | <div class="wpforms-dash-widget-settings-menu <?php echo $disabled ? 'disabled' : ''; ?>"> |
| 24 | |
| 25 | <?php if ( isset( $graph_style ) ) : ?> |
| 26 | <div class="wpforms-dash-widget-settings-menu-wrap"> |
| 27 | <h4><?php esc_html_e( 'Graph Style', 'wpforms-lite' ); ?></h4> |
| 28 | <div> |
| 29 | <div class="wpforms-dash-widget-settings-menu-item"> |
| 30 | <input type="radio" id="wpforms-dash-widget-settings-style-bar" name="wpforms-style" value="1" <?php checked( '1', $graph_style ); ?> <?php disabled( $disabled ); ?>> |
| 31 | <label for="wpforms-dash-widget-settings-style-bar" <?php disabled( $disabled ); ?>><?php esc_html_e( 'Bar', 'wpforms-lite' ); ?></label> |
| 32 | </div> |
| 33 | <div class="wpforms-dash-widget-settings-menu-item"> |
| 34 | <input type="radio" id="wpforms-dash-widget-settings-style-line" name="wpforms-style" value="2" <?php checked( '2', $graph_style ); ?> <?php disabled( $disabled ); ?>> |
| 35 | <label for="wpforms-dash-widget-settings-style-line" <?php disabled( $disabled ); ?>><?php esc_html_e( 'Line', 'wpforms-lite' ); ?></label> |
| 36 | </div> |
| 37 | </div> |
| 38 | </div> |
| 39 | <?php endif; ?> |
| 40 | |
| 41 | <?php if ( isset( $color_scheme ) ) : ?> |
| 42 | <div class="wpforms-dash-widget-settings-menu-wrap color-scheme"> |
| 43 | <h4><?php esc_html_e( 'Color Scheme', 'wpforms-lite' ); ?></h4> |
| 44 | <div> |
| 45 | <div class="wpforms-dash-widget-settings-menu-item"> |
| 46 | <input type="radio" id="wpforms-dash-widget-settings-color-wpforms" name="wpforms-color" value="1" <?php checked( '1', $color_scheme ); ?> <?php disabled( $disabled ); ?>> |
| 47 | <label for="wpforms-dash-widget-settings-color-wpforms" <?php disabled( $disabled ); ?>><?php esc_html_e( 'WPForms', 'wpforms-lite' ); ?></label> |
| 48 | </div> |
| 49 | <div class="wpforms-dash-widget-settings-menu-item"> |
| 50 | <input type="radio" id="wpforms-dash-widget-settings-color-wp" name="wpforms-color" value="2" <?php checked( '2', $color_scheme ); ?> <?php disabled( $disabled ); ?>> |
| 51 | <label for="wpforms-dash-widget-settings-color-wp" <?php disabled( $disabled ); ?>><?php esc_html_e( 'WordPress', 'wpforms-lite' ); ?></label> |
| 52 | </div> |
| 53 | </div> |
| 54 | </div> |
| 55 | <?php endif; ?> |
| 56 | |
| 57 | <button type="button" class="button wpforms-dash-widget-settings-menu-save" <?php disabled( $disabled ); ?>><?php esc_html_e( 'Save Changes', 'wpforms-lite' ); ?></button> |
| 58 | </div> |
| 59 | </div> |
| 60 |