aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/features/admin/emails.ts
diff options
context:
space:
mode:
Diffstat (limited to 'web_src/js/features/admin/emails.ts')
-rw-r--r--web_src/js/features/admin/emails.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/web_src/js/features/admin/emails.ts b/web_src/js/features/admin/emails.ts
new file mode 100644
index 0000000000..46fafa7eff
--- /dev/null
+++ b/web_src/js/features/admin/emails.ts
@@ -0,0 +1,14 @@
+import $ from 'jquery';
+
+export function initAdminEmails() {
+ function linkEmailAction(e) {
+ const $this = $(this);
+ $('#form-uid').val($this.data('uid'));
+ $('#form-email').val($this.data('email'));
+ $('#form-primary').val($this.data('primary'));
+ $('#form-activate').val($this.data('activate'));
+ $('#change-email-modal').modal('show');
+ e.preventDefault();
+ }
+ $('.link-email-action').on('click', linkEmailAction);
+}