deactivate-feedback.php
45 lines
| 1 | <?php |
| 2 | /** |
| 3 | * @var string $email |
| 4 | * |
| 5 | * @see /Backend/Feedback/Feedback.php |
| 6 | * @see loadFeedbackForm() |
| 7 | */ |
| 8 | $reasons = [ |
| 9 | 1 => '<li><label><input type="radio" name="wpstg_disable_reason" value="temporary"/>' . esc_html__('Only temporary', 'wp-staging') . '</label></li>', |
| 10 | 2 => '<li><label><input type="radio" name="wpstg_disable_reason" value="missing feature"/>' . esc_html__('Miss a feature', 'wp-staging') . '</label></li> |
| 11 | <li><input type="text" name="wpstg_disable_text[]" value="" placeholder="Please describe the feature"/></li>', |
| 12 | 3 => '<li><label><input type="radio" name="wpstg_disable_reason" value="technical issue"/>' . esc_html__('Technical Issue', 'wp-staging') . '</label></li> |
| 13 | <li><textarea name="wpstg_disable_text[]" placeholder="' . esc_html__('Can we help? Please describe your problem', 'wp-staging') . '"></textarea></li>', |
| 14 | 4 => '<li><label><input type="radio" name="wpstg_disable_reason" value="other plugin"/>' . esc_html__('Switched to another plugin/staging solution', 'wp-staging') . '</label></li> |
| 15 | <li><input type="text" name="wpstg_disable_text[]" value="" placeholder="Name of the plugin"/></li>', |
| 16 | 5 => '<li><label><input type="radio" name="wpstg_disable_reason" value="other"/>' . esc_html__('Other reason', 'wp-staging') . '</label></li> |
| 17 | <li><textarea name="wpstg_disable_text[]" placeholder="' . esc_html__('Please specify, if possible', 'wp-staging') . '"></textarea></li>', |
| 18 | ]; |
| 19 | shuffle($reasons); |
| 20 | ?> |
| 21 | |
| 22 | |
| 23 | <div id="wpstg-feedback-overlay" style="display: none;"> |
| 24 | <div id="wpstg-feedback-content"> |
| 25 | <form action="" method="post"> |
| 26 | <h3><strong><?php esc_html_e('Please let us know why you are deactivating:', 'wp-staging'); ?></strong></h3> |
| 27 | <ul> |
| 28 | <?php |
| 29 | foreach ($reasons as $reason) { |
| 30 | echo $reason; //phpcs:ignore |
| 31 | } |
| 32 | ?> |
| 33 | </ul> |
| 34 | <?php if ($email) : ?> |
| 35 | <input type="hidden" name="wpstg_disable_from" value="<?php echo esc_html($email); ?>"/> |
| 36 | <?php endif; ?> |
| 37 | <button id="wpstg-feedback-submit" class="button button-primary" type="submit" name="wpstg_disable_submit"> |
| 38 | <?php esc_html_e('Submit & Deactivate', 'wp-staging'); ?> |
| 39 | </button> |
| 40 | |
| 41 | <a class="button"><?php esc_html_e('Only Deactivate', 'wp-staging'); ?></a> |
| 42 | <a class="wpstg-feedback-not-deactivate" href="#"><?php esc_html_e('Don\'t deactivate', 'wp-staging'); ?></a> |
| 43 | </form> |
| 44 | </div> |
| 45 | </div> |