Browse Source
Merge pull request #14802 from abpframework/Restore-to-default-issue
Restore to default issue
pull/14805/head
Enis Necipoglu
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
20 additions and
7 deletions
-
modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/Components/FeatureManagementModal.razor.cs
-
modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml
-
modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/feature-management-modal.js
|
|
|
@ -116,12 +116,21 @@ public partial class FeatureManagementModal |
|
|
|
|
|
|
|
public virtual async Task DeleteAsync([NotNull] string providerName, string providerKey = null) |
|
|
|
{ |
|
|
|
if (!await Message.Confirm(L["AreYouSureToResetToDefault"])) |
|
|
|
try |
|
|
|
{ |
|
|
|
return; |
|
|
|
if (!await Message.Confirm(L["AreYouSureToResetToDefault"])) |
|
|
|
{ |
|
|
|
return; |
|
|
|
} |
|
|
|
await FeatureAppService.DeleteAsync(ProviderName, ProviderKey); |
|
|
|
await Message.Success(L["ResetedToDefault"]); |
|
|
|
|
|
|
|
await CloseModal(); |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|
await HandleErrorAsync(ex); |
|
|
|
} |
|
|
|
await FeatureAppService.DeleteAsync(ProviderName, ProviderKey); |
|
|
|
await Message.Success(L["ResetedToDefault"]); |
|
|
|
} |
|
|
|
|
|
|
|
protected virtual string GetNormalizedGroupName(string name) |
|
|
|
|
|
|
|
@ -18,8 +18,11 @@ |
|
|
|
return new HtmlLocalizer(localizer); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
<abp-script src="/Pages/FeatureManagement/feature-management-modal.js" /> |
|
|
|
|
|
|
|
<form method="post" asp-page="/FeatureManagement/FeatureManagementModal" data-script-class="abp.modals.FeatureManagement"> |
|
|
|
<abp-modal size="Large"> |
|
|
|
<abp-modal id="featureManagmentModal" size="Large"> |
|
|
|
<abp-modal-header title="@(L["Features"].Value)"></abp-modal-header> |
|
|
|
@if (Model.FeatureListResultDto != null && Model.FeatureListResultDto.Groups.Any()) |
|
|
|
{ |
|
|
|
|
|
|
|
@ -3,8 +3,6 @@ var abp = abp || {}; |
|
|
|
abp.modals = abp.modals || {}; |
|
|
|
|
|
|
|
let l = abp.localization.getResource("AbpFeatureManagement"); |
|
|
|
|
|
|
|
|
|
|
|
abp.modals.FeatureManagement = function () { |
|
|
|
abp.ResourceLoader.loadScript('/client-proxies/featureManagement-proxy.js'); |
|
|
|
$('#ResetToDefaults').click(function (e) { |
|
|
|
@ -16,6 +14,9 @@ var abp = abp || {}; |
|
|
|
volo.abp.featureManagement.features.delete(providerName, prodiverKey).then(function () { |
|
|
|
abp.notify.success(l('ResetedToDefault')); |
|
|
|
}); |
|
|
|
setTimeout(function () { |
|
|
|
$('#featureManagmentModal').modal('hide'); |
|
|
|
}, 500); |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|