| @@ -1,40 +1,64 @@ | ||
| 1 | +<?php | |
| 2 | +// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- View file, its variables are local to the include scope, not true globals. | |
| 3 | +defined('ABSPATH') || die('Restricted Access'); | |
| 4 | +?> | |
| 1 | 5 | <div class="acym__content acym_area padding-vertical-1 padding-horizontal-2 margin-bottom-2"> |
| 2 | 6 | <?php if (acym_level(ACYM_ESSENTIAL)) { ?> |
| 3 | 7 | <div class="margin-bottom-2 acym__configuration__rest_api cell grid-x"> |
| 4 | 8 | <div class="acym__title acym__title__secondary grid-x"> |
| 5 | - <?php echo acym_translation('ACYM_REST_API'); ?> | |
| 6 | - <?php echo acym_externalLink( | |
| 9 | + <?php echo esc_html(acym_translation('ACYM_REST_API')); ?> | |
| 10 | + <?php acym_externalLink( | |
| 7 | 11 | 'ACYM_DOCUMENTATION', |
| 8 | 12 | ACYM_DOCUMENTATION.'v/rest-api/', |
| 9 | 13 | true, |
| 10 | 14 | true, |
| 11 | - ['margin-left-1'] | |
| 15 | + ['margin-left-1 margin-right-1'] | |
| 12 | 16 | ); ?> |
| 13 | 17 | </div> |
| 14 | 18 | <div class="cell grid-x acym_vcenter"> |
| 15 | 19 | <label class="cell large-3" for="php_overrides"> |
| 16 | - <?php echo acym_translation('ACYM_ACTIVATE_REST_API').acym_info('ACYM_ACTIVATE_REST_API_DESC'); ?> | |
| 20 | + <?php echo esc_html(acym_translation('ACYM_ACTIVATE_REST_API')); | |
| 21 | + acym_info(['textShownInTooltip' => 'ACYM_ACTIVATE_REST_API_DESC']); ?> | |
| 17 | 22 | </label> |
| 18 | 23 | <div class="cell grid-x large-9"> |
| 19 | 24 | <?php |
| 20 | - echo acym_switch( | |
| 21 | - 'config[rest_api]', | |
| 22 | - $this->config->get('rest_api', 0) | |
| 23 | - ); | |
| 25 | + acym_switch([ | |
| 26 | + 'name' => 'config[rest_api]', | |
| 27 | + 'value' => $this->config->get('rest_api', 0), | |
| 28 | + ]); | |
| 24 | 29 | ?> |
| 25 | 30 | </div> |
| 26 | 31 | </div> |
| 32 | + <div class="cell grid-x acym_vcenter margin-top-1"> | |
| 33 | + <label class="cell large-3" for="api_key"> | |
| 34 | + <?php echo esc_html(acym_translation('ACYM_API_KEY')); | |
| 35 | + acym_info(['textShownInTooltip' => 'ACYM_API_KEY_DESC']); ?> | |
| 36 | + </label> | |
| 37 | + <input class="cell large-9" | |
| 38 | + id="api_key" | |
| 39 | + type="text" | |
| 40 | + name="config[api_key]" | |
| 41 | + value="<?php echo esc_attr($this->config->get('api_key')); ?>" /> | |
| 42 | + </div> | |
| 27 | 43 | </div> |
| 28 | 44 | <?php } ?> |
| 29 | 45 | |
| 30 | - <?php if (!empty($data['labelDropdownCaptcha']) && isset($data['level']) && isset($data['captchaOptions'])) { ?> | |
| 46 | + <?php if (isset($data['level']) && isset($data['captchaOptions'])) { ?> | |
| 31 | 47 | <div class="margin-bottom-2 cell margin-y acym__configuration__security__captcha"> |
| 32 | - <div class="acym__title acym__title__secondary"><?php echo $data['labelDropdownCaptcha'] ?></div> | |
| 48 | + <div class="acym__title acym__title__secondary"> | |
| 49 | + <?php echo esc_html(acym_translation('ACYM_CONFIGURATION_CAPTCHA')); ?> | |
| 50 | + <?php | |
| 51 | + if (!acym_level(ACYM_ESSENTIAL)) { | |
| 52 | + echo esc_html(' '.acym_translation('ACYM_PRO_VERSION_ONLY')); | |
| 53 | + } | |
| 54 | + ?> | |
| 55 | + </div> | |
| 33 | 56 | <div class="grid-x grid-margin-x margin-y"> |
| 34 | 57 | <div class="cell medium-6 grid-x"> |
| 35 | 58 | <label class="cell large-3" for="security_key"> |
| 36 | - <?php echo acym_translation('ACYM_CONFIGURATION_CAPTCHA').acym_info('ACYM_CAPTCHA_DESC'); ?> | |
| 59 | + <?php echo esc_html(acym_translation('ACYM_CONFIGURATION_CAPTCHA')); | |
| 60 | + acym_info(['textShownInTooltip' => 'ACYM_CAPTCHA_DESC']); ?> | |
| 37 | 61 | </label> |
| 38 | 62 | <div class="cell large-9"> |
| 39 | 63 | <?php |
| 40 | 64 | $attribs = [ |
| @@ -40,17 +64,23 @@ | ||
| 40 | 64 | $attribs = [ |
| 41 | 65 | 'class' => 'acym__select', |
| 42 | 66 | 'data-toggle-select' => '{"acym_ireCaptcha":".acym__config__captcha__recaptcha","acym_reCaptcha_v3":".acym__config__captcha__recaptcha, .acym__config__captcha__recaptcha_v3","acym_hcaptcha":".acym__config__captcha__hcaptcha" }', |
| 43 | 67 | ]; |
| 68 | + // To disable Captcha dropdown | |
| 44 | 69 | if (!$data['level']) { |
| 45 | 70 | $attribs['disabled'] = ''; |
| 46 | 71 | } |
| 47 | 72 | |
| 48 | - echo acym_select( | |
| 73 | + acym_select( | |
| 49 | 74 | $data['captchaOptions'], |
| 50 | 75 | 'config[captcha]', |
| 51 | 76 | $this->config->get('captcha', 'none'), |
| 52 | - $attribs | |
| 77 | + $attribs, | |
| 78 | + 'value', | |
| 79 | + 'text', | |
| 80 | + null, | |
| 81 | + false, | |
| 82 | + true | |
| 53 | 83 | ); |
| 54 | 84 | ?> |
| 55 | 85 | </div> |
| 56 | 86 | </div> |
| @@ -56,21 +86,22 @@ | ||
| 56 | 86 | </div> |
| 57 | 87 | <?php if ($data['level']) { ?> |
| 58 | 88 | <div class="cell medium-6 grid-x"> |
| 59 | 89 | <label class="cell large-3" for="security_key"> |
| 60 | - <?php echo acym_translation('ACYM_SECURITY_KEY').acym_info('ACYM_SECURITY_KEY_DESC'); ?> | |
| 90 | + <?php echo esc_html(acym_translation('ACYM_SECURITY_KEY')); | |
| 91 | + acym_info(['textShownInTooltip' => 'ACYM_SECURITY_KEY_DESC']); ?> | |
| 61 | 92 | </label> |
| 62 | 93 | <input class="cell large-9" |
| 63 | - id="security_key" | |
| 64 | - type="text" | |
| 65 | - name="config[security_key]" | |
| 66 | - value="<?php echo acym_escape($this->config->get('security_key')); ?>" /> | |
| 94 | + id="security_key" | |
| 95 | + type="text" | |
| 96 | + name="config[security_key]" | |
| 97 | + value="<?php echo esc_attr($this->config->get('security_key')); ?>" /> | |
| 67 | 98 | </div> |
| 68 | 99 | <div class="cell medium-6 grid-x acym__config__captcha__hcaptcha"> |
| 69 | 100 | <label class="cell large-3" for="hcaptcha_sitekey"> |
| 70 | 101 | <?php |
| 71 | - echo acym_translation('ACYM_GENERAL_SITE_KEY'); | |
| 72 | - echo acym_tooltip( | |
| 102 | + echo esc_html(acym_translation('ACYM_GENERAL_SITE_KEY')); | |
| 103 | + acym_tooltip( | |
| 73 | 104 | [ |
| 74 | 105 | 'hoveredText' => '<span class="acym__tooltip__info__container"><i class="acym__tooltip__info__icon acymicon-info-circle"></i></span>', |
| 75 | 106 | 'textShownInTooltip' => acym_translation('ACYM_CLICK_HERE_TO_CREATE'), |
| 76 | 107 | 'classContainer' => 'acym__tooltip__info', |
| @@ -79,18 +110,18 @@ | ||
| 79 | 110 | ); |
| 80 | 111 | ?> |
| 81 | 112 | </label> |
| 82 | 113 | <input class="cell large-9" |
| 83 | - id="hcaptcha_sitekey" | |
| 84 | - type="text" | |
| 85 | - name="config[hcaptcha_sitekey]" | |
| 86 | - value="<?php echo acym_escape($this->config->get('hcaptcha_sitekey')); ?>" /> | |
| 114 | + id="hcaptcha_sitekey" | |
| 115 | + type="text" | |
| 116 | + name="config[hcaptcha_sitekey]" | |
| 117 | + value="<?php echo esc_attr($this->config->get('hcaptcha_sitekey')); ?>" /> | |
| 87 | 118 | </div> |
| 88 | 119 | <div class="cell medium-6 grid-x acym__config__captcha__hcaptcha"> |
| 89 | 120 | <label class="cell large-3" for="hcaptcha_secretkey"> |
| 90 | 121 | <?php |
| 91 | - echo acym_translation('ACYM_GENERAL_SECRET_KEY'); | |
| 92 | - echo acym_tooltip( | |
| 122 | + echo esc_html(acym_translation('ACYM_GENERAL_SECRET_KEY')); | |
| 123 | + acym_tooltip( | |
| 93 | 124 | [ |
| 94 | 125 | 'hoveredText' => '<span class="acym__tooltip__info__container"><i class="acym__tooltip__info__icon acymicon-info-circle"></i></span>', |
| 95 | 126 | 'textShownInTooltip' => acym_translation('ACYM_CLICK_HERE_TO_CREATE'), |
| 96 | 127 | 'classContainer' => 'acym__tooltip__info', |
| @@ -99,19 +130,19 @@ | ||
| 99 | 130 | ); |
| 100 | 131 | ?> |
| 101 | 132 | </label> |
| 102 | 133 | <input class="cell large-9" |
| 103 | - id="hcaptcha_secretkey" | |
| 104 | - type="text" | |
| 105 | - name="config[hcaptcha_secretkey]" | |
| 106 | - value="<?php echo acym_escape($this->config->get('hcaptcha_secretkey')); ?>" /> | |
| 134 | + id="hcaptcha_secretkey" | |
| 135 | + type="text" | |
| 136 | + name="config[hcaptcha_secretkey]" | |
| 137 | + value="<?php echo esc_attr($this->config->get('hcaptcha_secretkey')); ?>" /> | |
| 107 | 138 | </div> |
| 108 | 139 | |
| 109 | 140 | <div class="cell medium-6 grid-x acym__config__captcha__recaptcha"> |
| 110 | 141 | <label class="cell large-3" for="recaptcha_sitekey"> |
| 111 | 142 | <?php |
| 112 | - echo acym_translation('ACYM_SITE_KEY'); | |
| 113 | - echo acym_tooltip( | |
| 143 | + echo esc_html(acym_translation('ACYM_SITE_KEY')); | |
| 144 | + acym_tooltip( | |
| 114 | 145 | [ |
| 115 | 146 | 'hoveredText' => '<span class="acym__tooltip__info__container"><i class="acym__tooltip__info__icon acymicon-info-circle"></i></span>', |
| 116 | 147 | 'textShownInTooltip' => acym_translation('ACYM_CLICK_HERE_TO_CREATE'), |
| 117 | 148 | 'classContainer' => 'acym__tooltip__info', |
| @@ -120,18 +151,18 @@ | ||
| 120 | 151 | ); |
| 121 | 152 | ?> |
| 122 | 153 | </label> |
| 123 | 154 | <input class="cell large-9" |
| 124 | - id="recaptcha_sitekey" | |
| 125 | - type="text" | |
| 126 | - name="config[recaptcha_sitekey]" | |
| 127 | - value="<?php echo acym_escape($this->config->get('recaptcha_sitekey')); ?>" /> | |
| 155 | + id="recaptcha_sitekey" | |
| 156 | + type="text" | |
| 157 | + name="config[recaptcha_sitekey]" | |
| 158 | + value="<?php echo esc_attr($this->config->get('recaptcha_sitekey')); ?>" /> | |
| 128 | 159 | </div> |
| 129 | 160 | <div class="cell medium-6 grid-x acym__config__captcha__recaptcha"> |
| 130 | 161 | <label class="cell large-3" for="recaptcha_secretkey"> |
| 131 | 162 | <?php |
| 132 | - echo acym_translation('ACYM_SECRET_KEY'); | |
| 133 | - echo acym_tooltip( | |
| 163 | + echo esc_html(acym_translation('ACYM_SECRET_KEY')); | |
| 164 | + acym_tooltip( | |
| 134 | 165 | [ |
| 135 | 166 | 'hoveredText' => '<span class="acym__tooltip__info__container"><i class="acym__tooltip__info__icon acymicon-info-circle"></i></span>', |
| 136 | 167 | 'textShownInTooltip' => acym_translation('ACYM_CLICK_HERE_TO_CREATE'), |
| 137 | 168 | 'classContainer' => 'acym__tooltip__info', |
| @@ -140,18 +171,18 @@ | ||
| 140 | 171 | ); |
| 141 | 172 | ?> |
| 142 | 173 | </label> |
| 143 | 174 | <input class="cell large-9" |
| 144 | - id="recaptcha_secretkey" | |
| 145 | - type="text" | |
| 146 | - name="config[recaptcha_secretkey]" | |
| 147 | - value="<?php echo acym_escape($this->config->get('recaptcha_secretkey')); ?>" /> | |
| 175 | + id="recaptcha_secretkey" | |
| 176 | + type="text" | |
| 177 | + name="config[recaptcha_secretkey]" | |
| 178 | + value="<?php echo esc_attr($this->config->get('recaptcha_secretkey')); ?>" /> | |
| 148 | 179 | </div> |
| 149 | 180 | <div class="cell medium-6 grid-x acym__config__captcha__recaptcha_v3"> |
| 150 | 181 | <label class="cell large-3" for="recaptcha_score"> |
| 151 | 182 | <?php |
| 152 | - echo acym_translation('ACYM_CAPTCHA_SCORE'); | |
| 153 | - echo acym_tooltip( | |
| 183 | + echo esc_html(acym_translation('ACYM_CAPTCHA_SCORE')); | |
| 184 | + acym_tooltip( | |
| 154 | 185 | [ |
| 155 | 186 | 'hoveredText' => '<span class="acym__tooltip__info__container"><i class="acym__tooltip__info__icon acymicon-info-circle"></i></span>', |
| 156 | 187 | 'textShownInTooltip' => acym_translation('ACYM_CAPTCHA_SCORE_DESC'), |
| 157 | 188 | 'classContainer' => 'acym__tooltip__info', |
| @@ -160,16 +191,16 @@ | ||
| 160 | 191 | ); |
| 161 | 192 | ?> |
| 162 | 193 | </label> |
| 163 | 194 | <input class="cell large-9" |
| 164 | - id="recaptcha_score" | |
| 165 | - type="number" | |
| 166 | - name="config[recaptcha_score]" | |
| 167 | - min="0" | |
| 168 | - max="1" | |
| 169 | - step="0.1" | |
| 170 | - onKeyDown="return false" | |
| 171 | - value="<?php echo acym_escape($this->config->get('recaptcha_score', 0.5)); ?>" /> | |
| 195 | + id="recaptcha_score" | |
| 196 | + type="number" | |
| 197 | + name="config[recaptcha_score]" | |
| 198 | + min="0" | |
| 199 | + max="1" | |
| 200 | + step="0.1" | |
| 201 | + onKeyDown="return false" | |
| 202 | + value="<?php echo esc_attr($this->config->get('recaptcha_score', 0.5)); ?>" /> | |
| 172 | 203 | </div> |
| 173 | 204 | <?php } ?> |
| 174 | 205 | </div> |
| 175 | 206 | </div> |
| @@ -176,9 +207,9 @@ | ||
| 176 | 207 | <?php } ?> |
| 177 | 208 | |
| 178 | 209 | <div class="acym__configuration__security__email cell grid-x"> |
| 179 | 210 | <div class="acym__title acym__title__secondary grid-x"> |
| 180 | - <?php echo acym_translation('ACYM_EMAIL_VERIFICATION'); ?> | |
| 211 | + <?php echo esc_html(acym_translation('ACYM_EMAIL_VERIFICATION')); ?> | |
| 181 | 212 | <div class="margin-left-1"> |
| 182 | 213 | <?php |
| 183 | 214 | $score = 100; |
| 184 | 215 | $tooltip = []; |
| @@ -185,9 +216,9 @@ | ||
| 185 | 216 | if ($this->config->get('email_checkdomain') == 0) { |
| 186 | 217 | $score -= 10; |
| 187 | 218 | $tooltip[] = acym_translation('ACYM_EMAIL_VERIFICATION_SCORE_DESC_DOMAIN_VERIFICATION'); |
| 188 | 219 | } |
| 189 | - if ($this->config->get('require_confirmation') == 0) { | |
| 220 | + if (empty($this->config->get('require_confirmation', 1))) { | |
| 190 | 221 | $score -= 30; |
| 191 | 222 | $tooltip[] = acym_translation('ACYM_EMAIL_VERIFICATION_SCORE_DESC_DOUBLE_OPT_IN'); |
| 192 | 223 | } |
| 193 | 224 | if ($this->config->get('email_spellcheck') == 0) { |
| @@ -225,11 +256,15 @@ | ||
| 225 | 256 | |
| 226 | 257 | if (!$oneEnabled) $tooltip[] = acym_translation('ACYM_YOU_SHOULD_ENABLE_CHECK'); |
| 227 | 258 | } |
| 228 | 259 | |
| 229 | - echo '('.acym_translationSprintf('ACYM_EMAIL_VERIFICATION_SCORE', $score).')'; | |
| 260 | + echo '('.esc_html(acym_translationSprintf('ACYM_EMAIL_VERIFICATION_SCORE', $score)).')'; | |
| 230 | 261 | if (!empty($tooltip)) { |
| 231 | - echo acym_info(implode('<br />', $tooltip)); | |
| 262 | + acym_info( | |
| 263 | + [ | |
| 264 | + 'textShownInTooltip' => implode('<br />', $tooltip), | |
| 265 | + ] | |
| 266 | + ); | |
| 232 | 267 | } |
| 233 | 268 | ?> |
| 234 | 269 | </div> |
| 235 | 270 | </div> |
| @@ -235,94 +270,90 @@ | ||
| 235 | 270 | </div> |
| 236 | 271 | <div class="grid-x margin-y"> |
| 237 | 272 | <div class="cell medium-6 grid-x"> |
| 238 | 273 | <?php |
| 239 | - echo acym_switch( | |
| 240 | - 'config[email_checkdomain]', | |
| 241 | - $this->config->get('email_checkdomain'), | |
| 242 | - acym_translation('ACYM_CHECK_DOMAIN_EXISTS'), | |
| 243 | - [], | |
| 244 | - 'xlarge-9 large-6 small-9' | |
| 245 | - ); | |
| 274 | + acym_switch([ | |
| 275 | + 'name' => 'config[email_checkdomain]', | |
| 276 | + 'value' => $this->config->get('email_checkdomain'), | |
| 277 | + 'label' => acym_translation('ACYM_CHECK_DOMAIN_EXISTS'), | |
| 278 | + 'labelClass' => 'xlarge-9 large-6 small-9', | |
| 279 | + ]); | |
| 246 | 280 | ?> |
| 247 | 281 | </div> |
| 248 | 282 | <div class="cell medium-6 grid-x"> |
| 249 | 283 | <?php |
| 250 | - echo acym_switch( | |
| 251 | - 'config[email_spellcheck]', | |
| 252 | - $this->config->get('email_spellcheck'), | |
| 253 | - acym_translation('ACYM_SPELLCHECK_SUGGESTIONS').acym_info('ACYM_SPELLCHECK_SUGGESTIONS_DESC'), | |
| 254 | - [], | |
| 255 | - 'xlarge-9 large-6 small-9' | |
| 256 | - ); | |
| 284 | + acym_switch([ | |
| 285 | + 'name' => 'config[email_spellcheck]', | |
| 286 | + 'value' => $this->config->get('email_spellcheck'), | |
| 287 | + 'label' => acym_translation('ACYM_SPELLCHECK_SUGGESTIONS'), | |
| 288 | + 'tip' => ['textShownInTooltip' => 'ACYM_SPELLCHECK_SUGGESTIONS_DESC'], | |
| 289 | + 'labelClass' => 'xlarge-9 large-6 small-9', | |
| 290 | + ]); | |
| 257 | 291 | ?> |
| 258 | 292 | </div> |
| 259 | 293 | <div class="cell medium-6 grid-x"> |
| 260 | 294 | <?php |
| 261 | - echo acym_switch( | |
| 262 | - 'config[email_confirmation]', | |
| 263 | - $this->config->get('email_confirmation'), | |
| 264 | - acym_translation('ACYM_ENABLE_EMAIL_CONFIRMATION_FOR_SUBSCRIPTION_FORM').acym_info('ACYM_ENABLE_EMAIL_CONFIRMATION_FOR_SUBSCRIPTION_FORM_DESC'), | |
| 265 | - [], | |
| 266 | - 'xlarge-9 large-6 small-9' | |
| 267 | - ); | |
| 295 | + acym_switch([ | |
| 296 | + 'name' => 'config[email_confirmation]', | |
| 297 | + 'value' => $this->config->get('email_confirmation'), | |
| 298 | + 'label' => acym_translation('ACYM_ENABLE_EMAIL_CONFIRMATION_FOR_SUBSCRIPTION_FORM'), | |
| 299 | + 'tip' => ['textShownInTooltip' => 'ACYM_ENABLE_EMAIL_CONFIRMATION_FOR_SUBSCRIPTION_FORM_DESC'], | |
| 300 | + 'labelClass' => 'xlarge-9 large-6 small-9', | |
| 301 | + ]); | |
| 268 | 302 | ?> |
| 269 | 303 | </div> |
| 270 | 304 | <div class="cell grid-x acychecker_ad"> |
| 271 | 305 | <div class="cell "> |
| 272 | 306 | <h6> |
| 273 | - <?php echo acym_translation('ACYM_ACYCHECKER_CONFIG_AD_TITLE'); ?> | |
| 274 | - <img class="acychecker_logo" alt="logo AcyChecker" src="<?php echo ACYM_IMAGES.'icons/logo_acychecker.png'; ?>" /> | |
| 307 | + <?php echo esc_html(acym_translation('ACYM_ACYCHECKER_CONFIG_AD_TITLE')); ?> | |
| 308 | + <img class="acychecker_logo" alt="logo AcyChecker" src="<?php echo esc_url(ACYM_IMAGES.'icons/logo_acychecker.png'); ?>" /> | |
| 275 | 309 | </h6> |
| 276 | 310 | </div> |
| 277 | 311 | <div class="cell xlarge-6 grid-x"> |
| 278 | 312 | <?php |
| 279 | - echo acym_switch( | |
| 280 | - 'config[email_verification]', | |
| 281 | - $this->config->get('email_verification'), | |
| 282 | - acym_translation('ACYM_ACYCHECKER_CHECK_SUBSCRIPTION'), | |
| 283 | - [], | |
| 284 | - 'xlarge-9 large-6 small-9', | |
| 285 | - 'auto', | |
| 286 | - '', | |
| 287 | - $data['acychecker_installed'] ? 'email_verification' : null, | |
| 288 | - true, | |
| 289 | - '', | |
| 290 | - !$data['acychecker_installed'] | |
| 291 | - ); | |
| 313 | + acym_switch([ | |
| 314 | + 'name' => 'config[email_verification]', | |
| 315 | + 'value' => $this->config->get('email_verification'), | |
| 316 | + 'label' => acym_translation('ACYM_ACYCHECKER_CHECK_SUBSCRIPTION'), | |
| 317 | + 'labelClass' => 'xlarge-9 large-6 small-9', | |
| 318 | + 'toggle' => $data['acychecker_installed'] ? 'email_verification' : null, | |
| 319 | + 'disabled' => !$data['acychecker_installed'], | |
| 320 | + ]); | |
| 292 | 321 | ?> |
| 293 | 322 | </div> |
| 294 | 323 | <div id="email_verification" class="cell grid-x"> |
| 295 | 324 | <label class="cell margin-top-1"> |
| 296 | - <?php echo acym_translation('ACYM_ACYCHECKER_CHECK_SUBSCRIPTION_BLOCK'); ?> | |
| 325 | + <?php echo esc_html(acym_translation('ACYM_ACYCHECKER_CHECK_SUBSCRIPTION_BLOCK')); ?> | |
| 297 | 326 | </label> |
| 298 | 327 | <div class="cell large-6 grid-x"> |
| 299 | 328 | <?php |
| 300 | 329 | $verificationOptions = [ |
| 301 | 330 | 'email_verification_non_existing' => ['ACYM_ACYCHECKER_CHECK_SUBSCRIPTION_BLOCK_NON_EXISTING', ''], |
| 302 | - 'email_verification_disposable' => ['ACYM_ACYCHECKER_CHECK_SUBSCRIPTION_BLOCK_DISPOSABLE', 'ACYM_ACYCHECKER_CHECK_SUBSCRIPTION_BLOCK_DISPOSABLE_DESC'], | |
| 331 | + 'email_verification_disposable' => [ | |
| 332 | + 'ACYM_ACYCHECKER_CHECK_SUBSCRIPTION_BLOCK_DISPOSABLE', | |
| 333 | + 'ACYM_ACYCHECKER_CHECK_SUBSCRIPTION_BLOCK_DISPOSABLE_DESC', | |
| 334 | + ], | |
| 303 | 335 | 'email_verification_free' => ['ACYM_ACYCHECKER_CHECK_SUBSCRIPTION_BLOCK_FREE', 'ACYM_ACYCHECKER_CHECK_SUBSCRIPTION_BLOCK_FREE_DESC'], |
| 304 | 336 | 'email_verification_role' => ['ACYM_ACYCHECKER_CHECK_SUBSCRIPTION_BLOCK_ROLE', 'ACYM_ACYCHECKER_CHECK_SUBSCRIPTION_BLOCK_ROLE_DESC'], |
| 305 | - 'email_verification_acceptall' => ['ACYM_ACYCHECKER_CHECK_SUBSCRIPTION_BLOCK_ACCEPT_ALL', 'ACYM_ACYCHECKER_CHECK_SUBSCRIPTION_BLOCK_ACCEPT_ALL_DESC'], | |
| 337 | + 'email_verification_acceptall' => [ | |
| 338 | + 'ACYM_ACYCHECKER_CHECK_SUBSCRIPTION_BLOCK_ACCEPT_ALL', | |
| 339 | + 'ACYM_ACYCHECKER_CHECK_SUBSCRIPTION_BLOCK_ACCEPT_ALL_DESC', | |
| 340 | + ], | |
| 306 | 341 | ]; |
| 307 | 342 | |
| 308 | 343 | foreach ($verificationOptions as $option => $label) { |
| 309 | 344 | echo '<div class="cell grid-x margin-bottom-1">'; |
| 310 | - $optionText = acym_translation($label[0]); | |
| 311 | - if (!empty($label[1])) $optionText .= acym_info($label[1]); | |
| 312 | - echo acym_switch( | |
| 313 | - 'config['.$option.']', | |
| 314 | - $this->config->get($option), | |
| 315 | - $optionText, | |
| 316 | - [], | |
| 317 | - 'small-9', | |
| 318 | - 'auto', | |
| 319 | - '', | |
| 320 | - null, | |
| 321 | - true, | |
| 322 | - '', | |
| 323 | - !$data['acychecker_installed'] | |
| 324 | - ); | |
| 345 | + $switchOptions = [ | |
| 346 | + 'name' => 'config['.$option.']', | |
| 347 | + 'value' => $this->config->get($option), | |
| 348 | + 'label' => acym_translation($label[0]), | |
| 349 | + 'labelClass' => 'small-9', | |
| 350 | + 'disabled' => !$data['acychecker_installed'], | |
| 351 | + ]; | |
| 352 | + if (!empty($label[1])) { | |
| 353 | + $switchOptions['tip'] = ['textShownInTooltip' => $label[1]]; | |
| 354 | + } | |
| 355 | + acym_switch($switchOptions); | |
| 325 | 356 | echo '</div>'; |
| 326 | 357 | } |
| 327 | 358 | ?> |
| 328 | 359 | </div> |
| @@ -328,11 +359,11 @@ | ||
| 328 | 359 | </div> |
| 329 | 360 | <?php if (!$data['acychecker_installed']) { ?> |
| 330 | 361 | <div class="cell large-6 grid-x align-center"> |
| 331 | 362 | <div class="cell large-6 grid-x align-center text-center"> |
| 332 | - <?php echo acym_translation('ACYM_ACYCHECKER_CONFIG_AD'); ?> | |
| 333 | - <a target="_blank" class="cell shrink button button-secondary" href="<?php echo $data['acychecker_get_link']; ?>"> | |
| 334 | - <?php echo acym_translation('ACYM_ACYCHECKER_CONFIG_AD_BUTTON'); ?> | |
| 363 | + <?php echo esc_html(acym_translation('ACYM_ACYCHECKER_CONFIG_AD')); ?> | |
| 364 | + <a target="_blank" class="cell shrink button button-secondary" href="<?php echo esc_url($data['acychecker_get_link']); ?>"> | |
| 365 | + <?php echo esc_html(acym_translation('ACYM_ACYCHECKER_CONFIG_AD_BUTTON')); ?> | |
| 335 | 366 | </a> |
| 336 | 367 | </div> |
| 337 | 368 | </div> |
| 338 | 369 | <?php } ?> |
| @@ -343,23 +374,28 @@ | ||
| 343 | 374 | </div> |
| 344 | 375 | |
| 345 | 376 | <div class="acym__content acym_area padding-horizontal-2 acym__configuration__advanced"> |
| 346 | 377 | <div class="cell grid-x acym__configuration__showmore-head"> |
| 347 | - <div class="acym__title acym__title__secondary cell auto margin-bottom-0"><?php echo acym_translation('ACYM_CONFIGURATION_ADVANCED'); ?></div> | |
| 378 | + <div class="acym__title acym__title__secondary cell auto margin-bottom-0"><?php echo esc_html(acym_translation('ACYM_CONFIGURATION_ADVANCED')); ?></div> | |
| 348 | 379 | <div class="cell shrink"> |
| 349 | - <?php echo acym_showMore('acym__configuration__security__advanced__content'); ?> | |
| 380 | + <?php acym_showMore('acym__configuration__security__advanced__content'); ?> | |
| 350 | 381 | </div> |
| 351 | 382 | </div> |
| 352 | 383 | <div id="acym__configuration__security__advanced__content" style="display:none;"> |
| 353 | - <?php if (!empty($data['acl'])) { ?> | |
| 384 | + <?php if ($data['adminPermissions']) { ?> | |
| 354 | 385 | <div class="margin-bottom-2"> |
| 355 | - <div class="acym__title acym__title__secondary"><?php echo acym_translation('ACYM_PERMISSIONS'); ?></div> | |
| 386 | + <div class="acym__title acym__title__secondary"><?php echo esc_html(acym_translation('ACYM_PERMISSIONS')); ?></div> | |
| 356 | 387 | <div class="grid-x grid-margin-x margin-y"> |
| 357 | - <?php echo $data['acl']; ?> | |
| 388 | + <?php acym_cmsPermission(); ?> | |
| 358 | 389 | <div class="cell grid-x"> |
| 359 | - <label class="cell large-3 medium-5 small-9"><?php echo acym_translation('ACYM_ADVANCED_ACL').acym_info('ACYM_ADVANCED_ACL_DESC'); ?></label> | |
| 390 | + <label class="cell large-3 medium-5 small-9"> | |
| 391 | + <?php echo esc_html(acym_translation('ACYM_ADVANCED_ACL')); | |
| 392 | + acym_info(['textShownInTooltip' => 'ACYM_ADVANCED_ACL_DESC']); ?> | |
| 393 | + </label> | |
| 360 | 394 | <div class="cell auto"> |
| 361 | - <button type="button" class="button button-secondary" id="acym__configuration__acl__toggle"><?php echo acym_translation('ACYM_SHOW_HIDE'); ?></button> | |
| 395 | + <button type="button" class="button button-secondary" id="acym__configuration__acl__toggle"><?php echo esc_html( | |
| 396 | + acym_translation('ACYM_SHOW_HIDE') | |
| 397 | + ); ?></button> | |
| 362 | 398 | </div> |
| 363 | 399 | </div> |
| 364 | 400 | </div> |
| 365 | 401 | <div class="grid-x grid-margin-x" id="acym__configuration__acl__zone"> |
| @@ -366,12 +402,12 @@ | ||
| 366 | 402 | <input type="hidden" name="json_acl" id="json_acl" /> |
| 367 | 403 | <?php foreach ($data['acl_advanced'] as $page => $title) { ?> |
| 368 | 404 | <div class="cell grid-x acym__configuration__acl__row"> |
| 369 | 405 | <div class="cell large-3 margin-left-1"> |
| 370 | - <?php echo acym_translation($title); ?> | |
| 406 | + <?php echo esc_html(acym_translation($title)); ?> | |
| 371 | 407 | </div> |
| 372 | 408 | <div class="cell auto"> |
| 373 | - <?php echo $data['aclType']->display($page); ?> | |
| 409 | + <?php $data['aclType']->display($page); ?> | |
| 374 | 410 | </div> |
| 375 | 411 | </div> |
| 376 | 412 | <?php } ?> |
| 377 | 413 | </div> |
| @@ -379,14 +415,17 @@ | ||
| 379 | 415 | <?php } ?> |
| 380 | 416 | <?php if ('joomla' === ACYM_CMS) { |
| 381 | 417 | if (acym_level(ACYM_ENTERPRISE)) { ?> |
| 382 | 418 | <div class="margin-bottom-2"> |
| 383 | - <div class="acym__title acym__title__secondary"><?php echo acym_translation('ACYM_FRONTEND_EDITION'); ?></div> | |
| 419 | + <div class="acym__title acym__title__secondary"><?php echo esc_html(acym_translation('ACYM_FRONTEND_EDITION')); ?></div> | |
| 384 | 420 | <div class="grid-x grid-margin-x grid-margin-y"> |
| 385 | - <div class="cell large-3 small-12"><?php echo acym_translation('ACYM_FRONT_DELETE_BUTTON').acym_info('ACYM_FRONT_DELETE_BUTTON_DESC'); ?></div> | |
| 421 | + <div class="cell large-3 small-12"><?php echo esc_html(acym_translation('ACYM_FRONT_DELETE_BUTTON')); | |
| 422 | + acym_info( | |
| 423 | + ['textShownInTooltip' => 'ACYM_FRONT_DELETE_BUTTON_DESC'] | |
| 424 | + ); ?></div> | |
| 386 | 425 | <div class="cell auto"> |
| 387 | 426 | <?php |
| 388 | - echo acym_radio( | |
| 427 | + acym_radio( | |
| 389 | 428 | [ |
| 390 | 429 | 'delete' => acym_translation('ACYM_DELETE_THE_SUBSCRIBER'), |
| 391 | 430 | 'removesub' => acym_translation('ACYM_REMOVE_USER_SUBSCRIPTION'), |
| 392 | 431 | ], |
| @@ -396,12 +435,12 @@ | ||
| 396 | 435 | ?> |
| 397 | 436 | </div> |
| 398 | 437 | </div> |
| 399 | 438 | <div class="grid-x grid-margin-x grid-margin-y"> |
| 400 | - <div class="cell large-3"><?php echo acym_translation('ACYM_FRONT_FILTER_CAMPAIGNS'); ?></div> | |
| 439 | + <div class="cell large-3"><?php echo esc_html(acym_translation('ACYM_FRONT_FILTER_CAMPAIGNS')); ?></div> | |
| 401 | 440 | <div class="cell large-9"> |
| 402 | 441 | <?php |
| 403 | - echo acym_select( | |
| 442 | + acym_select( | |
| 404 | 443 | [ |
| 405 | 444 | 'own' => acym_translation('ACYM_FRONT_ONLY_CREATED_CAMPAIGNS'), |
| 406 | 445 | 'allowed' => acym_translation('ACYM_FRONT_SENT_TO_ALLOWED_LISTS'), |
| 407 | 446 | ], |
| @@ -408,9 +447,14 @@ | ||
| 408 | 447 | 'config[front_campaigns_filter]', |
| 409 | 448 | $this->config->get('front_campaigns_filter', 'own'), |
| 410 | 449 | [ |
| 411 | 450 | 'class' => 'acym__select', |
| 412 | - ] | |
| 451 | + ], | |
| 452 | + 'value', | |
| 453 | + 'text', | |
| 454 | + null, | |
| 455 | + false, | |
| 456 | + true | |
| 413 | 457 | ); |
| 414 | 458 | ?> |
| 415 | 459 | </div> |
| 416 | 460 | </div> |
| @@ -418,48 +462,52 @@ | ||
| 418 | 462 | <?php // __END__enterprise_ |
| 419 | 463 | } |
| 420 | 464 | } ?> |
| 421 | 465 | <div class="margin-bottom-2"> |
| 422 | - <div class="acym__title acym__title__secondary"><?php echo acym_translation('ACYM_FILES'); ?></div> | |
| 466 | + <div class="acym__title acym__title__secondary"><?php echo esc_html(acym_translation('ACYM_FILES')); ?></div> | |
| 423 | 467 | <div class="grid-x grid-margin-y margin-y"> |
| 424 | 468 | |
| 425 | 469 | <label class="cell large-3" for="allowed_files"> |
| 426 | - <?php echo acym_translation('ACYM_ALLOWED_FILES').acym_info('ACYM_ALLOWED_FILES_DESC'); ?> | |
| 470 | + <?php echo esc_html(acym_translation('ACYM_ALLOWED_FILES')); | |
| 471 | + acym_info(['textShownInTooltip' => 'ACYM_ALLOWED_FILES_DESC']); ?> | |
| 427 | 472 | </label> |
| 428 | 473 | <input class="cell auto" |
| 429 | - id="allowed_files" | |
| 430 | - type="text" | |
| 431 | - name="config[allowed_files]" | |
| 432 | - value="<?php echo acym_escape($this->config->get('allowed_files')); ?>" /> | |
| 474 | + id="allowed_files" | |
| 475 | + type="text" | |
| 476 | + name="config[allowed_files]" | |
| 477 | + value="<?php echo esc_attr($this->config->get('allowed_files')); ?>" /> | |
| 433 | 478 | </div> |
| 434 | 479 | <div class="grid-x grid-margin-y margin-y"> |
| 435 | 480 | <label class="cell large-3" for="uploadfolder"> |
| 436 | - <?php echo acym_translation('ACYM_UPLOAD_FOLDER').acym_info('ACYM_UPLOAD_FOLDER_DESC'); ?> | |
| 481 | + <?php echo esc_html(acym_translation('ACYM_UPLOAD_FOLDER')); | |
| 482 | + acym_info(['textShownInTooltip' => 'ACYM_UPLOAD_FOLDER_DESC']); ?> | |
| 437 | 483 | </label> |
| 438 | - <input class="cell large-9" id="uploadfolder" type="text" name="config[uploadfolder]" value="<?php echo acym_escape($this->config->get('uploadfolder')); ?>" /> | |
| 484 | + <input class="cell large-9" id="uploadfolder" type="text" name="config[uploadfolder]" value="<?php echo esc_attr($this->config->get('uploadfolder')); ?>" /> | |
| 439 | 485 | </div> |
| 440 | 486 | <?php |
| 441 | 487 | ?> |
| 442 | 488 | <div class="cell grid-x grid-margin-y margin-y acym_vcenter"> |
| 443 | 489 | <label class="cell large-3" for="php_overrides"> |
| 444 | - <?php echo acym_translation('ACYM_ALLOW_PHP_OVERRIDES').acym_info('ACYM_ALLOW_PHP_OVERRIDES_DESC'); ?> | |
| 490 | + <?php echo esc_html(acym_translation('ACYM_ALLOW_PHP_OVERRIDES')); | |
| 491 | + acym_info(['textShownInTooltip' => 'ACYM_ALLOW_PHP_OVERRIDES_DESC']); ?> | |
| 445 | 492 | </label> |
| 446 | 493 | <div class="cell grid-x large-9"> |
| 447 | 494 | <?php |
| 448 | - echo acym_switch( | |
| 449 | - 'config[php_overrides]', | |
| 450 | - $this->config->get('php_overrides', 0) | |
| 451 | - ); | |
| 495 | + acym_switch([ | |
| 496 | + 'name' => 'config[php_overrides]', | |
| 497 | + 'value' => $this->config->get('php_overrides', 0), | |
| 498 | + ]); | |
| 452 | 499 | ?> |
| 453 | 500 | </div> |
| 454 | 501 | </div> |
| 455 | 502 | </div> |
| 456 | 503 | <div class="acym__configuration__check-database margin-bottom-2"> |
| 457 | - <div class="acym__title acym__title__secondary"><?php echo acym_translation('ACYM_REDIRECTIONS'); ?></div> | |
| 504 | + <div class="acym__title acym__title__secondary"><?php echo esc_html(acym_translation('ACYM_REDIRECTIONS')); ?></div> | |
| 458 | 505 | <div class="grid-x grid-margin-x margin-y"> |
| 459 | 506 | <div class="cell grid-x acym_vcenter"> |
| 460 | 507 | <label class="cell large-3" for="allowed_files"> |
| 461 | - <?php echo acym_translation('ACYM_ALLOWED_HOSTS').acym_info('ACYM_ALLOWED_HOSTS_DESC'); ?> | |
| 508 | + <?php echo esc_html(acym_translation('ACYM_ALLOWED_HOSTS')); | |
| 509 | + acym_info(['textShownInTooltip' => 'ACYM_ALLOWED_HOSTS_DESC']); ?> | |
| 462 | 510 | </label> |
| 463 | 511 | <div class="cell grid-x large-9"> |
| 464 | 512 | <?php |
| 465 | 513 | $allowedHosts = $this->config->get('allowed_hosts', ''); |
| @@ -473,13 +521,16 @@ | ||
| 473 | 521 | foreach ($allowedHosts as $host) { |
| 474 | 522 | $allowedHostsFormatted[$host] = $host; |
| 475 | 523 | } |
| 476 | 524 | } |
| 477 | - echo acym_selectMultiple( | |
| 525 | + acym_selectMultiple( | |
| 478 | 526 | $allowedHostsFormatted, |
| 479 | 527 | 'config[allowed_hosts]', |
| 480 | 528 | $allowedHosts, |
| 481 | - ['class' => 'acym__allowed__hosts__select', 'placeholder' => acym_translation('ACYM_ENTER_NEW_DOMAIN')] | |
| 529 | + ['class' => 'acym__allowed__hosts__select', 'placeholder' => acym_translation('ACYM_ENTER_NEW_DOMAIN')], | |
| 530 | + 'value', | |
| 531 | + 'text', | |
| 532 | + true | |
| 482 | 533 | ); |
| 483 | 534 | ?> |
| 484 | 535 | </div> |
| 485 | 536 | </div> |
| @@ -484,34 +535,51 @@ | ||
| 484 | 535 | </div> |
| 485 | 536 | </div> |
| 486 | 537 | <div class="cell grid-x acym_vcenter"> |
| 487 | 538 | <label class="cell large-3" for="allowed_files"> |
| 488 | - <?php echo acym_translation('ACYM_ACTIVATE_AUTOLOGIN_URLS').acym_info('ACYM_ACTIVATE_AUTOLOGIN_URLS_DESC'); ?> | |
| 539 | + <?php | |
| 540 | + echo esc_html(acym_translation('ACYM_ACTIVATE_AUTOLOGIN_URLS')); | |
| 541 | + acym_info(['textShownInTooltip' => 'ACYM_ACTIVATE_AUTOLOGIN_URLS_DESCRIPTION']); | |
| 542 | + ?> | |
| 489 | 543 | </label> |
| 490 | 544 | <div class="cell grid-x large-9"> |
| 491 | 545 | <?php |
| 492 | - echo acym_switch( | |
| 493 | - 'config[autologin_urls]', | |
| 494 | - $this->config->get('autologin_urls', 0) | |
| 495 | - ); | |
| 546 | + acym_switch([ | |
| 547 | + 'name' => 'config[autologin_urls]', | |
| 548 | + 'value' => $this->config->get('autologin_urls', 0), | |
| 549 | + 'toggle' => 'autologin_urls_duration', | |
| 550 | + ]); | |
| 496 | 551 | ?> |
| 497 | 552 | </div> |
| 498 | 553 | </div> |
| 554 | + <div class="cell grid-x acym_vcenter" id="autologin_urls_duration"> | |
| 555 | + <label class="cell large-3"> | |
| 556 | + <?php echo esc_html(acym_translation('ACYM_AUTOLOGIN_TOKEN_DURATION')); | |
| 557 | + acym_info(['textShownInTooltip' => 'ACYM_AUTOLOGIN_TOKEN_DURATION_DESC']); ?> | |
| 558 | + </label> | |
| 559 | + <div class="cell large-9"> | |
| 560 | + <input type="number" | |
| 561 | + name="config[autologin_token_duration]" | |
| 562 | + value="<?php echo intval($this->config->get('autologin_token_duration', 48)); ?>" | |
| 563 | + min="1" | |
| 564 | + class="intext_input" /> | |
| 565 | + </div> | |
| 566 | + </div> | |
| 499 | 567 | </div> |
| 500 | 568 | </div> |
| 501 | 569 | <div class="margin-bottom-2"> |
| 502 | - <div class="acym__title acym__title__secondary"><?php echo acym_translation('ACYM_CRON'); ?></div> | |
| 570 | + <div class="acym__title acym__title__secondary"><?php echo esc_html(acym_translation('ACYM_CRON')); ?></div> | |
| 503 | 571 | <div class="grid-x grid-margin-x margin-y"> |
| 504 | 572 | <div class="cell grid-x acym_vcenter"> |
| 505 | 573 | <label class="cell large-3" for="cron_security"> |
| 506 | - <?php echo acym_translation('ACYM_ADD_SECURITY_KEY_CRON'); ?> | |
| 574 | + <?php echo esc_html(acym_translation('ACYM_ADD_SECURITY_KEY_CRON')); ?> | |
| 507 | 575 | </label> |
| 508 | 576 | <div class="cell grid-x large-9"> |
| 509 | 577 | <?php |
| 510 | - echo acym_switch( | |
| 511 | - 'config[cron_security]', | |
| 512 | - $this->config->get('cron_security', 0) | |
| 513 | - ); | |
| 578 | + acym_switch([ | |
| 579 | + 'name' => 'config[cron_security]', | |
| 580 | + 'value' => $this->config->get('cron_security', 0), | |
| 581 | + ]); | |
| 514 | 582 | ?> |
| 515 | 583 | </div> |
| 516 | 584 | </div> |
| 517 | 585 | </div> |
| @@ -516,37 +584,33 @@ | ||
| 516 | 584 | </div> |
| 517 | 585 | </div> |
| 518 | 586 | <div class="grid-x grid-margin-y margin-y"> |
| 519 | 587 | <label class="cell large-3" for="cron_key"> |
| 520 | - <?php echo acym_translation('ACYM_CRON_KEY').acym_info('ACYM_CRON_KEY_DESC'); ?> | |
| 588 | + <?php echo esc_html(acym_translation('ACYM_CRON_KEY')); | |
| 589 | + acym_info(['textShownInTooltip' => 'ACYM_CRON_KEY_DESC']); ?> | |
| 521 | 590 | </label> |
| 522 | 591 | <input class="cell large-9" |
| 523 | - id="cron_key" | |
| 524 | - type="text" | |
| 525 | - name="config[cron_key]" | |
| 526 | - value="<?php echo acym_escape($this->config->get('cron_key', $this->config->get('security_key', ''))); ?>" /> | |
| 592 | + id="cron_key" | |
| 593 | + type="text" | |
| 594 | + name="config[cron_key]" | |
| 595 | + value="<?php echo esc_attr($this->config->get('cron_key', $this->config->get('security_key', ''))); ?>" /> | |
| 527 | 596 | </div> |
| 528 | 597 | </div> |
| 529 | 598 | |
| 530 | 599 | <div class="margin-bottom-2"> |
| 531 | - <div class="acym__title acym__title__secondary"><?php echo acym_translation('ACYM_URL'); ?></div> | |
| 600 | + <div class="acym__title acym__title__secondary"><?php echo esc_html(acym_translation('ACYM_URL')); ?></div> | |
| 532 | 601 | <div class="grid-x grid-margin-x margin-y"> |
| 533 | 602 | <div class="cell grid-x acym_vcenter"> |
| 534 | 603 | <label class="cell large-3" for="different_admin_url_toggle"> |
| 535 | - <?php echo acym_translation('ACYM_FRONT_BACK_URL'); ?> | |
| 604 | + <?php echo esc_html(acym_translation('ACYM_FRONT_BACK_URL')); ?> | |
| 536 | 605 | </label> |
| 537 | 606 | <div class="cell grid-x large-9"> |
| 538 | 607 | <?php |
| 539 | - echo acym_switch( | |
| 540 | - 'config[different_admin_url_toggle]', | |
| 541 | - $this->config->get('different_admin_url_toggle', 0), | |
| 542 | - '', | |
| 543 | - [], | |
| 544 | - '', | |
| 545 | - '', | |
| 546 | - '', | |
| 547 | - 'cron_security_config' | |
| 548 | - ); | |
| 608 | + acym_switch([ | |
| 609 | + 'name' => 'config[different_admin_url_toggle]', | |
| 610 | + 'value' => $this->config->get('different_admin_url_toggle', 0), | |
| 611 | + 'toggle' => 'cron_security_config', | |
| 612 | + ]); | |
| 549 | 613 | ?> |
| 550 | 614 | </div> |
| 551 | 615 | </div> |
| 552 | 616 | </div> |
| @@ -552,27 +616,27 @@ | ||
| 552 | 616 | </div> |
| 553 | 617 | <div class="grid-x grid-margin-y margin-y" id="cron_security_config"> |
| 554 | 618 | <div class="cell grid-x acym_vcenter"> |
| 555 | 619 | <label class="cell large-3" for="different_admin_url_value"> |
| 556 | - <?php echo acym_translation('ACYM_BACKEND_URL'); ?> | |
| 620 | + <?php echo esc_html(acym_translation('ACYM_BACKEND_URL')); ?> | |
| 557 | 621 | </label> |
| 558 | 622 | <?php $differentUrl = $this->config->get('different_admin_url_value'); ?> |
| 559 | 623 | <input class="cell large-9" |
| 560 | - id="different_admin_url_value" | |
| 561 | - type="text" | |
| 562 | - name="config[different_admin_url_value]" | |
| 563 | - placeholder="<?php echo acym_escape(rtrim(ACYM_LIVE, '/')); ?>" | |
| 564 | - value="<?php echo acym_escape($differentUrl); ?>" /> | |
| 624 | + id="different_admin_url_value" | |
| 625 | + type="text" | |
| 626 | + name="config[different_admin_url_value]" | |
| 627 | + placeholder="<?php echo esc_attr(rtrim(ACYM_LIVE, '/')); ?>" | |
| 628 | + value="<?php echo esc_attr($differentUrl); ?>" /> | |
| 565 | 629 | </div> |
| 566 | 630 | </div> |
| 567 | 631 | </div> |
| 568 | 632 | |
| 569 | 633 | <div class="acym__configuration__check-database margin-bottom-2"> |
| 570 | - <div class="acym__title acym__title__secondary"><?php echo acym_translation('ACYM_CONFIGURATION_DB_MAINTENANCE'); ?></div> | |
| 634 | + <div class="acym__title acym__title__secondary"><?php echo esc_html(acym_translation('ACYM_CONFIGURATION_DB_MAINTENANCE')); ?></div> | |
| 571 | 635 | <div class="grid-x grid-margin-x margin-y"> |
| 572 | 636 | <div class="cell grid-x"> |
| 573 | 637 | <?php |
| 574 | - echo acym_tooltip( | |
| 638 | + acym_tooltip( | |
| 575 | 639 | [ |
| 576 | 640 | 'hoveredText' => '<button type="button" class="cell medium-shrink button button-secondary" id="checkdb_button">'.acym_translation( |
| 577 | 641 | 'ACYM_CHECK_DB' |
| 578 | 642 | ).'</button>', |
| @@ -585,9 +649,9 @@ | ||
| 585 | 649 | </div> |
| 586 | 650 | <?php if (acym_existsAcyMailing59()) { ?> |
| 587 | 651 | <div class="cell grid-x"> |
| 588 | 652 | <button type="submit" data-task="redomigration" class="cell medium-shrink button button-secondary acy_button_submit"> |
| 589 | - <?php echo acym_translation('ACYM_REDO_MIGRATION'); ?> | |
| 653 | + <?php echo esc_html(acym_translation('ACYM_REDO_MIGRATION')); ?> | |
| 590 | 654 | </button> |
| 591 | 655 | </div> |
| 592 | 656 | <?php } ?> |
| 593 | 657 | </div> |
| @@ -594,19 +658,23 @@ | ||
| 594 | 658 | </div> |
| 595 | 659 | |
| 596 | 660 | <?php if (acym_isLogFileErrorExist()) { ?> |
| 597 | 661 | <div class="acym__configuration__log"> |
| 598 | - <div class="acym__title acym__title__secondary"><?php echo acym_translation('ACYM_LOG_FILE'); ?></div> | |
| 662 | + <div class="acym__title acym__title__secondary"><?php echo esc_html(acym_translation('ACYM_LOG_FILE')); ?></div> | |
| 599 | 663 | <div class="grid-x grid-margin-x margin-y"> |
| 600 | 664 | <div class="cell grid-x"> |
| 601 | 665 | <div class="cell grid-x"> |
| 602 | 666 | <?php |
| 603 | - echo acym_modal( | |
| 667 | + acym_modal( | |
| 604 | 668 | acym_translation('ACYM_REPORT_SEE'), |
| 605 | 669 | '', |
| 606 | 670 | null, |
| 607 | - '', | |
| 608 | - 'class="button button-secondary" data-ajax="true" data-iframe="&ctrl=configuration&task=seeLogs&filename='.acym_getErrorLogFilename().'"' | |
| 671 | + [], | |
| 672 | + [ | |
| 673 | + 'class' => 'button button-secondary', | |
| 674 | + 'data-ajax' => 'true', | |
| 675 | + 'data-iframe' => '&ctrl=configuration&task=seeLogs&filename='.acym_getErrorLogFilename(), | |
| 676 | + ] | |
| 609 | 677 | ); |
| 610 | 678 | ?> |
| 611 | 679 | </div> |
| 612 | 680 | </div> |