| @@ -1,4 +1,9 @@ | ||
| 1 | +<?php | |
| 2 | +$dir_file = realpath(dirname(__FILE__) . '/../class/easy-basic-authentication-class.php'); | |
| 3 | +$content_file = "add_action( 'init', array(\$this,'basic_auth_admin') );"; | |
| 4 | +?> | |
| 5 | + | |
| 1 | 6 | <div class="wrap easy-basic-settings"> |
| 2 | 7 | <div class="error-message"> |
| 3 | 8 | <?php settings_errors(); ?> |
| 4 | 9 | </div> |
| @@ -8,8 +13,44 @@ | ||
| 8 | 13 | do_settings_sections( 'basic-auth-plugin-settings' ); |
| 9 | 14 | submit_button(__('save', 'easy-basic-authentication'), 'primary', 'eba_submit', false); |
| 10 | 15 | ?> |
| 11 | 16 | </form> |
| 17 | + <div id="password-recovery-alert" class="container"> | |
| 18 | + <div class="alert alert-warning alert-dismissible fade show" role="alert"> | |
| 19 | + <strong><?php echo esc_html__('Attention:', 'easy-basic-authentication'); ?></strong> <?php echo esc_html__('To recover your password, you need to comment out a line in a file via FTP.', 'easy-basic-authentication'); ?> | |
| 20 | + <?php echo esc_html__('Please follow the instructions', 'easy-basic-authentication'); ?> <a href="#" class="alert-link" onclick="toggleInstructions()"><?php echo esc_html__('here.', 'easy-basic-authentication');?></a> | |
| 21 | + </div> | |
| 22 | + | |
| 23 | + <div id="instructions" style="display: none;" class="mt-3"> | |
| 24 | + <p><strong><?php echo esc_html__('Instructions:', 'easy-basic-authentication'); ?></strong></p> | |
| 25 | + <ol> | |
| 26 | + <li><?php echo esc_html__('Connect to your website via FTP.', 'easy-basic-authentication'); ?></li> | |
| 27 | + <li><?php echo esc_html__('Navigate to the plugin directory.', 'easy-basic-authentication'); ?></li> | |
| 28 | + <li><?php | |
| 29 | + // translators: %s è il percorso del file del plugin | |
| 30 | + echo sprintf(esc_html__('Locate the file named %s.', 'easy-basic-authentication'), esc_attr($dir_file)); ?> | |
| 31 | + </li> | |
| 32 | + <li><?php | |
| 33 | + // translators: %s is the content file path | |
| 34 | + echo sprintf(esc_html__('Find the line containing %s.', 'easy-basic-authentication'), esc_attr($content_file)); ?> | |
| 35 | + </li> | |
| 36 | + <li><?php echo esc_html__('Comment out that line by adding "#" at the beginning.', 'easy-basic-authentication'); ?></li> | |
| 37 | + <li><?php echo esc_html__('Save the file and re-upload it to your server.', 'easy-basic-authentication'); ?></li> | |
| 38 | + </ol> | |
| 39 | + </div> | |
| 40 | + </div> | |
| 41 | + | |
| 42 | + <script> | |
| 43 | + function toggleInstructions() { | |
| 44 | + var instructions = document.getElementById("instructions"); | |
| 45 | + if (instructions.style.display === "none") { | |
| 46 | + instructions.style.display = "block"; | |
| 47 | + } else { | |
| 48 | + instructions.style.display = "none"; | |
| 49 | + } | |
| 50 | + } | |
| 51 | + </script> | |
| 52 | + | |
| 12 | 53 | </div> |
| 13 | 54 | |
| 14 | 55 | <style> |
| 15 | 56 | .easy-basic-settings { |
| @@ -42,6 +83,23 @@ | ||
| 42 | 83 | } |
| 43 | 84 | |
| 44 | 85 | .easy-basic-form .submit:hover { |
| 45 | 86 | background-color: #005b82; |
| 87 | +} | |
| 88 | + | |
| 89 | +.easy-basic-form input[type=checkbox], | |
| 90 | +.easy-basic-form input[type=radio] { | |
| 91 | + padding: 10px 20px; | |
| 92 | + height: 1.5625rem; | |
| 93 | + width: 1.5625rem; | |
| 94 | +} | |
| 95 | + | |
| 96 | +.easy-basic-form input[type=checkbox]:checked:before { | |
| 97 | + width: 1.875rem; | |
| 98 | + height: 1.875rem; | |
| 99 | + margin: -0.1875rem -0.3125rem; | |
| 100 | +} | |
| 101 | + | |
| 102 | +.easy-basic-settings #password-recovery-alert { | |
| 103 | + margin-top: 30px; | |
| 46 | 104 | } |
| 47 | 105 | </style> |