summaryrefslogtreecommitdiff
path: root/resources/js/webtrees.js
diff options
context:
space:
mode:
Diffstat (limited to 'resources/js/webtrees.js')
-rw-r--r--resources/js/webtrees.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/resources/js/webtrees.js b/resources/js/webtrees.js
index f14f5f8441..54da0c37ac 100644
--- a/resources/js/webtrees.js
+++ b/resources/js/webtrees.js
@@ -766,6 +766,32 @@ $(function () {
$('.wt-osk-close').on('click', function () {
$('.wt-osk').hide();
});
+
+ // Hide/Show password fields
+ $('input[type=password]').each(function () {
+ $(this).hideShowPassword('infer', true, {
+ states: {
+ shown: {
+ toggle: {
+ content: this.dataset.hideText,
+ attr: {
+ title: this.dataset.hideTitle,
+ 'aria-label': this.dataset.hideTitle,
+ }
+ }
+ },
+ hidden: {
+ toggle: {
+ content: this.dataset.showText,
+ attr: {
+ title: this.dataset.showTitle,
+ 'aria-label': this.dataset.showTitle,
+ }
+ }
+ }
+ }
+ });
+ });
});
// Prevent form re-submission via accidental double-click.