Skip to content

Commit

Permalink
アクセス制限を追加できない不具合を改善
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuring committed Jan 23, 2021
1 parent 23897ad commit 78145dc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
33 changes: 18 additions & 15 deletions app/webroot/theme/admin-third/js/admin/permission.js
Expand Up @@ -54,23 +54,26 @@ $(function () {
click: function () {
$("#PermissionAjaxAddForm").submit();
if ($("#PermissionAjaxAddForm").valid()) {
$("#PermissionAjaxAddForm").ajaxSubmit({
beforeSend: function () {
$("#Waiting").show();
},
success: function (response, status) {
if (response) {
$("#PermissionDialog").dialog('close');
} else {
$.bcToken.check(function () {
$('#PermissionAjaxAddForm input[name="data[_Token][key]"]').val($.bcToken.key);
$("#PermissionAjaxAddForm").ajaxSubmit({
beforeSend: function () {
$("#Waiting").show();
},
success: function (response, status) {
if (response) {
$("#PermissionDialog").dialog('close');
} else {
alert(bcI18n.commonSaveFailedMessage);
}
},
error: function (e) {
alert(bcI18n.commonSaveFailedMessage);
},
complete: function () {
$("#Waiting").hide();
}
},
error: function () {
alert(bcI18n.commonSaveFailedMessage);
},
complete: function () {
$("#Waiting").hide();
}
});
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Baser/Controller/PermissionsController.php
Expand Up @@ -197,7 +197,7 @@ public function admin_ajax_add()
__d('baser', '新規アクセス制限設定「%s」を追加しました。'), $this->request->data['Permission']['name']
)
);
exit();
exit(true);
}

/**
Expand Down

0 comments on commit 78145dc

Please sign in to comment.