{% requirePermission "pp:settings" %} {% extends "password-policy/_layouts/password-policy-cp.twig" %} {% import '_includes/forms.twig' as forms %} {% set tabs = { features: { label: 'Configuration'|t('password-policy'), url: '#features' }, rules: { label: 'Password Rules'|t('password-policy'), url: '#rules' }, retention: { label: 'Password Retention Features'|t('password-policy'), url: '#retention' }, } %} {% block actionButton %} {% endblock %} {% block content %}
{{ forms.lightswitchField({ label: 'Enable "have i been pwned".'|t('password-policy'), instructions: "Do passwords need to be checked against the 'have i been pwned' database?"|t('password-policy'), name: 'settings[pwned]', on: settings.pwned, }) }}

{{ forms.lightswitchField({ label: 'Show password strength indicator.'|t('password-policy'), instructions: "A password strength indicator helps giving users feedback about the safety of their chosen password.?"|t('password-policy'), name: 'settings[showStrengthIndicator]', on: settings.showStrengthIndicator, }) }}

{{ forms.lightswitchField({ label: 'Enable CSP Nonce'|t('password-policy'), instructions: 'Generates a Content Security Policy nonce for the password indicator script. Useful for strict CSP policies that don\'t use `script-src \'self\'` and instead require nonces for all scripts, even external ones.'|t('password-policy'), name: 'settings[cspNonce]', on: settings.cspNonce, tip: 'Most users don\'t need this. Only enable if you have a strict CSP policy that requires nonces for external scripts instead of allowing `\'self\'`.'|t('password-policy'), }) }}
{% endblock %}