mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
ui: add confirm to domain_delete
This commit is contained in:
3 files changed
+18
-1
No files matched your search
@@ -189,6 +189,7 @@ Completed: 已完成
|
||||
Config: 配置
|
||||
Confirm deleting the selected roles?: 您确定删除所选角色吗?
|
||||
Confirm deleting this comment? Its replies will be deleted as well.: 确认删除这个评论吗?回复会被同时删除。
|
||||
Confirm deleting this domain? This action cannot be undone.: '确认删除此域?此操作无法撤销。'
|
||||
Confirm deleting this reply?: 确认删除这个回复吗?
|
||||
Confirm rejudge this problem?: 确定要重测这道题吗?
|
||||
Confirm removing the selected users?: 您确定将所选用户移除吗?
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { confirm } from 'vj/components/dialog';
|
||||
import { NamedPage } from 'vj/misc/Page';
|
||||
import { i18n } from 'vj/utils';
|
||||
|
||||
export default new NamedPage('domain_dashboard', () => {
|
||||
let confirmed = false;
|
||||
$(document).on('submit', '#delete-domain-form', (ev) => {
|
||||
if (confirmed) return;
|
||||
ev.preventDefault();
|
||||
confirm(i18n('Confirm deleting this domain? This action cannot be undone.')).then((yes) => {
|
||||
if (!yes) return;
|
||||
confirmed = true;
|
||||
$(ev.currentTarget).submit();
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -31,7 +31,7 @@
|
||||
<div class="section__header">
|
||||
<h1 class="section__title" data-heading>{{ _('Delete Domain') }}</h1>
|
||||
<div class="section__tools">
|
||||
<form method="POST">
|
||||
<form method="POST" id="delete-domain-form">
|
||||
<div>
|
||||
<input type="hidden" name="operation" value="delete">
|
||||
<input type="submit" value="{{ _('Delete Domain') }}" class="rounded primary button">
|
||||
|
||||
Reference in new issue
Block a user