| @@ -1,119 +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 | - | |
| 6 | -<div class="wrap easy-basic-settings"> | |
| 7 | - <div class="error-message"> | |
| 8 | - <?php settings_errors(); ?> | |
| 9 | - </div> | |
| 10 | - | |
| 11 | - <?php if ( ! is_ssl() ) : ?> | |
| 12 | - <div class="notice notice-warning"> | |
| 13 | - <p> | |
| 14 | - <strong><?php echo __('Warning:', 'easy-basic-authentication'); ?></strong> | |
| 15 | - <?php echo __('Your site is currently not using HTTPS. Basic Authentication may not work correctly over HTTP due to browser and server restrictions.', 'easy-basic-authentication'); ?> | |
| 16 | - </p> | |
| 17 | - </div> | |
| 18 | - <?php endif; ?> | |
| 19 | - | |
| 20 | - <form method="post" action="options.php" class="easy-basic-form"> | |
| 1 | +<div class="wrap"> | |
| 2 | + <form method="post" action="options.php"> | |
| 21 | 3 | <?php |
| 22 | - easy_basic_authentication_compatcheck_class::render_button_html(); | |
| 23 | - | |
| 24 | 4 | settings_fields( 'basic-auth-plugin-settings' ); |
| 25 | 5 | do_settings_sections( 'basic-auth-plugin-settings' ); |
| 26 | - submit_button(__('Save Settings', 'easy-basic-authentication'), 'primary', 'eba_submit', false); | |
| 6 | + submit_button(__('save', 'easy-basic-authentication'), 'primary', 'eba_submit', false); | |
| 27 | 7 | ?> |
| 28 | 8 | </form> |
| 29 | - | |
| 30 | - <div id="password-recovery-alert" class="container"> | |
| 31 | - <div class="alert alert-warning alert-dismissible fade show" role="alert"> | |
| 32 | - <strong><?php echo esc_html__('Attention:', 'easy-basic-authentication'); ?></strong> | |
| 33 | - <?php echo esc_html__('To recover your password, you need to comment out a line in a file via FTP.', 'easy-basic-authentication'); ?> | |
| 34 | - <?php echo esc_html__('Please follow the instructions', 'easy-basic-authentication'); ?> | |
| 35 | - <a href="#" class="alert-link" onclick="toggleInstructions()"><?php echo esc_html__('here.', 'easy-basic-authentication');?></a> | |
| 36 | - </div> | |
| 37 | - | |
| 38 | - <div id="instructions" style="display: none;" class="mt-3"> | |
| 39 | - <p><strong><?php echo esc_html__('Instructions:', 'easy-basic-authentication'); ?></strong></p> | |
| 40 | - <ol> | |
| 41 | - <li><?php echo esc_html__('Connect to your website via FTP.', 'easy-basic-authentication'); ?></li> | |
| 42 | - <li><?php echo esc_html__('Navigate to the plugin directory.', 'easy-basic-authentication'); ?></li> | |
| 43 | - <li><?php | |
| 44 | - echo sprintf( | |
| 45 | - esc_html__('Locate the file named %s.', 'easy-basic-authentication'), | |
| 46 | - esc_attr($dir_file) | |
| 47 | - ); ?> | |
| 48 | - </li> | |
| 49 | - <li><?php | |
| 50 | - echo sprintf( | |
| 51 | - esc_html__('Find the line containing %s.', 'easy-basic-authentication'), | |
| 52 | - esc_attr($content_file) | |
| 53 | - ); ?> | |
| 54 | - </li> | |
| 55 | - <li><?php echo esc_html__('Comment out that line by adding "#" at the beginning.', 'easy-basic-authentication'); ?></li> | |
| 56 | - <li><?php echo esc_html__('Save the file and re-upload it to your server.', 'easy-basic-authentication'); ?></li> | |
| 57 | - </ol> | |
| 58 | - </div> | |
| 59 | - </div> | |
| 60 | - | |
| 61 | - <script> | |
| 62 | - function toggleInstructions() { | |
| 63 | - var instructions = document.getElementById("instructions"); | |
| 64 | - instructions.style.display = (instructions.style.display === "none") ? "block" : "none"; | |
| 65 | - } | |
| 66 | - </script> | |
| 67 | -</div> | |
| 68 | - | |
| 69 | -<style> | |
| 70 | -.easy-basic-settings { | |
| 71 | - background-color: #f9f9f9; | |
| 72 | - padding: 20px; | |
| 73 | - border: 1px solid #ddd; | |
| 74 | -} | |
| 75 | - | |
| 76 | -.easy-basic-form { | |
| 77 | - margin-top: 20px; | |
| 78 | -} | |
| 79 | - | |
| 80 | -.easy-basic-form input[type="text"], | |
| 81 | -.easy-basic-form input[type="password"], | |
| 82 | -.easy-basic-form textarea { | |
| 83 | - width: 100%; | |
| 84 | - padding: 10px; | |
| 85 | - margin-top: 10px; | |
| 86 | - border: 1px solid #ddd; | |
| 87 | - border-radius: 4px; | |
| 88 | -} | |
| 89 | - | |
| 90 | -.easy-basic-form .submit { | |
| 91 | - background-color: #0073aa; | |
| 92 | - color: #fff; | |
| 93 | - border: none; | |
| 94 | - padding: 10px 20px; | |
| 95 | - border-radius: 4px; | |
| 96 | - cursor: pointer; | |
| 97 | -} | |
| 98 | - | |
| 99 | -.easy-basic-form .submit:hover { | |
| 100 | - background-color: #005b82; | |
| 101 | -} | |
| 102 | - | |
| 103 | -.easy-basic-form input[type=checkbox], | |
| 104 | -.easy-basic-form input[type=radio] { | |
| 105 | - padding: 10px 20px; | |
| 106 | - height: 1.5625rem; | |
| 107 | - width: 1.5625rem; | |
| 108 | -} | |
| 109 | - | |
| 110 | -.easy-basic-form input[type=checkbox]:checked:before { | |
| 111 | - width: 1.875rem; | |
| 112 | - height: 1.875rem; | |
| 113 | - margin: -0.1875rem -0.3125rem; | |
| 114 | -} | |
| 115 | - | |
| 116 | -.easy-basic-settings #password-recovery-alert { | |
| 117 | - margin-top: 30px; | |
| 118 | -} | |
| 119 | -</style> | |
| 9 | +</div> | |