mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
fix role manage
This commit is contained in:
1 parent
15d43636c0
commit
42e534615e
34 files changed
+221
-314
No files matched your search
@@ -1,19 +0,0 @@
|
||||
import { NamedPage } from 'vj/misc/PageLoader';
|
||||
|
||||
import * as domainEnum from 'vj/constant/domain';
|
||||
|
||||
const page = new NamedPage('domain_manage_join_applications', () => {
|
||||
const $role = $('[name="role"]');
|
||||
const $expire = $('[name="expire"]');
|
||||
const $code = $('[name="invitation_code"]');
|
||||
function updateFormState() {
|
||||
const method = parseInt($('[name="method"]:checked').val(), 10);
|
||||
$role.prop('disabled', method === domainEnum.JOIN_METHOD_NONE).trigger('vjFormDisableUpdate');
|
||||
$expire.prop('disabled', method === domainEnum.JOIN_METHOD_NONE).trigger('vjFormDisableUpdate');
|
||||
$code.prop('disabled', method !== domainEnum.JOIN_METHOD_CODE).trigger('vjFormDisableUpdate');
|
||||
}
|
||||
updateFormState();
|
||||
$('[name="method"]').change(() => updateFormState());
|
||||
});
|
||||
|
||||
export default page;
|
||||
@@ -73,7 +73,7 @@ const page = new NamedPage('domain_manage_role', () => {
|
||||
try {
|
||||
await request.post('', {
|
||||
operation: 'delete',
|
||||
role: selectedRoles,
|
||||
roles: selectedRoles,
|
||||
});
|
||||
Notification.success(i18n('Selected roles have been deleted.'));
|
||||
await delay(2000);
|
||||
|
||||
@@ -2,8 +2,5 @@
|
||||
.col--checkbox
|
||||
width: 60px
|
||||
|
||||
.col--id
|
||||
width: 140px
|
||||
|
||||
.col--users
|
||||
width: 100px
|
||||
Reference in new issue
Block a user