forgejo/web_src/js/features/admin/emails.js
Gusted 8eb8f49581 feat: move more modals to native dialogs (#9636)
Follow up of forgejo/forgejo#8859

Move the following modals to native dialogs:
- Admin notice.
- Edit label.
- New label.
- Update email in admin's email list.

Each has a E2E test to screenshot the modal and test functionality.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9636
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-10-13 17:48:49 +02:00

15 lines
498 B
JavaScript

import $ from 'jquery';
import {showModal} from '../../modules/modal.ts';
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'));
showModal('change-email-modal', undefined);
e.preventDefault();
}
$('.link-email-action').on('click', linkEmailAction);
}