Skip to content

Commit c241a14

Browse files
authored
Update Index.js
fix Save Error, using "$("input[name='role']:checked")" would return the first input element of the entire page(both CreateModal and EditModal).
1 parent ecb6808 commit c241a14

File tree

1 file changed

+1
-1
lines changed
  • aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/wwwroot/view-resources/Views/Roles

1 file changed

+1
-1
lines changed

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/wwwroot/view-resources/Views/Roles/Index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181

8282
var role = _$form.serializeFormToObject();
8383
role.grantedPermissions = [];
84-
var _$permissionCheckboxes = $("input[name='permission']:checked");
84+
var _$permissionCheckboxes = _$form[0].querySelectorAll("input[name='permission']:checked");
8585
if (_$permissionCheckboxes) {
8686
for (var permissionIndex = 0; permissionIndex < _$permissionCheckboxes.length; permissionIndex++) {
8787
var _$permissionCheckbox = $(_$permissionCheckboxes[permissionIndex]);

0 commit comments

Comments
 (0)