aboutsummaryrefslogtreecommitdiff
path: root/app/views/configure/integration.phtml
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 /app/views/configure/integration.phtml
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 'app/views/configure/integration.phtml')
-rw-r--r--app/views/configure/integration.phtml6
1 files changed, 2 insertions, 4 deletions
diff --git a/app/views/configure/integration.phtml b/app/views/configure/integration.phtml
index 8368f916b..c45533214 100644
--- a/app/views/configure/integration.phtml
+++ b/app/views/configure/integration.phtml
@@ -77,8 +77,7 @@
<?= _t('conf.sharing.share_name') ?>
</label>
<div class="group-controls">
- <input type="text" id="share_<?= $key ?>_name" name="share[<?= $key ?>][name]" value="<?= $share->name() ?>"
- data-leave-validation="<?= $share->name() ?>" />
+ <input type="text" id="share_<?= $key ?>_name" name="share[<?= $key ?>][name]" value="<?= $share->name() ?>" />
</div>
</div>
@@ -90,8 +89,7 @@
<div class="group-controls">
<div class="stick">
- <input type="url" id="share_<?= $key ?>_url" name="share[<?= $key ?>][url]" class="long" value="<?= $share->baseUrl() ?>"
- data-leave-validation="<?= $share->baseUrl() ?>" required />
+ <input type="url" id="share_<?= $key ?>_url" name="share[<?= $key ?>][url]" class="long" value="<?= $share->baseUrl() ?>" required="required" />
<a class="btn open-url" target="_blank" rel="noreferrer" href="<?= $share->baseUrl() ?>" title="<?= _t('gen.action.open_url') ?>" data-input="share_<?= $key ?>_url"><?= _i('link') ?></a>
</div>
<p class="help"><?= _i('help') ?> <a href="<?= $share->help() ?>" target="_blank" rel="noreferrer"><?= _t('conf.sharing.more_information') ?></a></p>