aboutsummaryrefslogtreecommitdiff
path: root/lib/core-extensions/UserCSS
diff options
context:
space:
mode:
authorGravatar Inverle <inverle@proton.me> 2025-08-08 17:39:38 +0200
committerGravatar GitHub <noreply@github.com> 2025-08-08 17:39:38 +0200
commitd9197d7e32a97f29829ffd4cf4371b1853e51fa2 (patch)
tree83549245e159f9cbdad05868a359afcf278bec79 /lib/core-extensions/UserCSS
parenta3854c2f5978ab40c023c8bdf9b4be96eca3ef22 (diff)
New JS attribute: `data-auto-leave-validation` (#7785)
Instead of a repeating pattern like: `<input type="text" value="something" data-leave-validation="something">`, you can now put a `data-auto-leave-validation="1"` attribute on a `<form>` for example, and it will automatically set the `data-leave-validation` attributes inside the form elements. `data_auto_leave_validation(parent)` from `extra.js` is called on slider open and page load. --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
Diffstat (limited to 'lib/core-extensions/UserCSS')
-rw-r--r--lib/core-extensions/UserCSS/configure.phtml2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/core-extensions/UserCSS/configure.phtml b/lib/core-extensions/UserCSS/configure.phtml
index 22d4ea79a..49f3c2f82 100644
--- a/lib/core-extensions/UserCSS/configure.phtml
+++ b/lib/core-extensions/UserCSS/configure.phtml
@@ -2,7 +2,7 @@
declare(strict_types=1);
/** @var UserCSSExtension $this */
?>
-<form action="<?= _url('extension', 'configure', 'e', urlencode($this->getName())); ?>" method="post">
+<form action="<?= _url('extension', 'configure', 'e', urlencode($this->getName())); ?>" method="post" data-auto-leave-validation="1">
<input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
<div class="form-group">
<label class="group-name" for="css-rules"><?= _t('ext.user_css.write_css') ?></label>