mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-10-19 02:43:18 +00:00

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>
15 lines
498 B
JavaScript
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);
|
|
}
|