modal.php
79 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Challenge main modal window template. |
| 4 | * |
| 5 | * @since 1.6.2 |
| 6 | * |
| 7 | * @var string $state |
| 8 | * @var integer $step |
| 9 | * @var integer $minutes |
| 10 | */ |
| 11 | |
| 12 | if ( ! \defined( 'ABSPATH' ) ) { |
| 13 | exit; |
| 14 | } |
| 15 | |
| 16 | ?> |
| 17 | <div class="wpforms-challenge <?php echo 'start' === $state ? 'wpforms-challenge-start' : ''; ?>" |
| 18 | data-wpforms-challenge-saved-step="<?php echo absint( $step ); ?>"> |
| 19 | |
| 20 | <div class="wpforms-challenge-list-block"> |
| 21 | <i class="list-block-button toggle-list" title="<?php esc_attr_e( 'Toggle list', 'wpforms-lite' ); ?>"></i> |
| 22 | <i class="list-block-button challenge-skip" title="<?php esc_attr_e( 'Skip challenge', 'wpforms-lite' ); ?>" |
| 23 | data-cancel-title="<?php esc_attr_e( 'Cancel challenge', 'wpforms-lite' ); ?>"></i> |
| 24 | <p> |
| 25 | <?php |
| 26 | echo wp_kses( |
| 27 | sprintf( |
| 28 | /* translators: %1$d - number of minutes, %2$s - singular or plural form of 'minute'. */ |
| 29 | __( 'Complete the <b>WPForms Challenge</b> and get up and running within %1$d %2$s.', 'wpforms-lite' ), |
| 30 | absint( $minutes ), |
| 31 | _n( 'minute', 'minutes', absint( $minutes ), 'wpforms-lite' ) |
| 32 | ), |
| 33 | [ 'b' => [] ] |
| 34 | ); |
| 35 | ?> |
| 36 | </p> |
| 37 | <ul class="wpforms-challenge-list"> |
| 38 | <li class="wpforms-challenge-step1-item"><span></span><?php esc_html_e( 'Name Your Form', 'wpforms-lite' ); ?></li> |
| 39 | <li class="wpforms-challenge-step2-item"><span></span><?php esc_html_e( 'Select a Template', 'wpforms-lite' ); ?></li> |
| 40 | <li class="wpforms-challenge-step3-item"><span></span><?php esc_html_e( 'Add Fields to Your Form', 'wpforms-lite' ); ?></li> |
| 41 | <li class="wpforms-challenge-step4-item"><span></span><?php esc_html_e( 'Check Notifications', 'wpforms-lite' ); ?></li> |
| 42 | <li class="wpforms-challenge-step5-item"><span></span><?php esc_html_e( 'Embed in a Page', 'wpforms-lite' ); ?></li> |
| 43 | <li class="wpforms-challenge-completed"><span></span><?php esc_html_e( 'Challenge Complete', 'wpforms-lite' ); ?></li> |
| 44 | </ul> |
| 45 | </div> |
| 46 | |
| 47 | <div class="wpforms-challenge-bar" style="display:none"> |
| 48 | <div></div> |
| 49 | </div> |
| 50 | |
| 51 | <div class="wpforms-challenge-block-timer"> |
| 52 | <img src="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/images/challenge/sullie-circle.png' ); ?>" alt="<?php esc_html_e( 'Sullie the WPForms mascot', 'wpforms-lite' ); ?>"> |
| 53 | <div> |
| 54 | <h3><?php esc_html_e( 'WPForms Challenge', 'wpforms-lite' ); ?></h3> |
| 55 | <p> |
| 56 | <?php |
| 57 | printf( |
| 58 | /* translators: %s - minutes in 2:00 format. */ |
| 59 | esc_html__( '%s remaining', 'wpforms-lite' ), |
| 60 | '<span id="wpforms-challenge-timer">' . absint( $minutes ) . ':00</span>' |
| 61 | ); |
| 62 | ?> |
| 63 | </p> |
| 64 | </div> |
| 65 | </div> |
| 66 | |
| 67 | <div class="wpforms-challenge-block-under-timer"> |
| 68 | <?php if ( 'start' === $state ) : ?> |
| 69 | <a href="<?php echo esc_url( admin_url( 'admin.php?page=wpforms-builder' ) ); ?>" class="wpforms-btn wpforms-btn-md wpforms-btn-orange wpforms-challenge-start"> |
| 70 | <?php esc_html_e( 'Start Challenge', 'wpforms-lite' ); ?> |
| 71 | </a> |
| 72 | <?php elseif ( 'progress' === $state ) : ?> |
| 73 | <button type="button" class="wpforms-btn wpforms-btn-md wpforms-btn-grey wpforms-challenge-pause"><?php esc_html_e( 'Pause', 'wpforms-lite' ); ?></button> |
| 74 | <button type="button" class="wpforms-btn wpforms-btn-md wpforms-btn-orange wpforms-challenge-resume" style="display: none;"><?php esc_html_e( 'Continue', 'wpforms-lite' ); ?></button> |
| 75 | <button type="button" class="wpforms-btn wpforms-btn-md wpforms-btn-orange wpforms-challenge-end" style="display: none;"><?php esc_html_e( 'End Challenge', 'wpforms-lite' ); ?></button> |
| 76 | <?php endif; ?> |
| 77 | </div> |
| 78 | </div> |
| 79 |