aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/features/admin-emails.js
blob: 46fafa7eff05d19919b02d1fec5dcb145fb8efb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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);
}