diff --git a/Oqtane.Client/Modules/Controls/ActionDialog.razor b/Oqtane.Client/Modules/Controls/ActionDialog.razor index b39b4f27..09e93225 100644 --- a/Oqtane.Client/Modules/Controls/ActionDialog.razor +++ b/Oqtane.Client/Modules/Controls/ActionDialog.razor @@ -22,9 +22,9 @@ @@ -66,12 +66,12 @@ else {
- +
}
- +
@@ -128,6 +128,12 @@ else [Parameter] public string Class { get; set; } // optional + [Parameter] + public string ConfirmClass { get; set; } // optional - for Confirm modal button + + [Parameter] + public string CancelClass { get; set; } // optional - for Cancel modal button + [Parameter] public bool Disabled { get; set; } // optional @@ -168,6 +174,16 @@ else Class = "btn btn-success"; } + if (string.IsNullOrEmpty(ConfirmClass)) + { + ConfirmClass = Class; + } + + if (string.IsNullOrEmpty(CancelClass)) + { + CancelClass = "btn btn-secondary"; + } + if (!string.IsNullOrEmpty(EditMode)) { _editmode = bool.Parse(EditMode); @@ -196,7 +212,7 @@ else _openIconSpan = $"{(IconOnly ? "" : " ")}"; _iconSpan = $" "; } - + _permissions = (PermissionList == null) ? ModuleState.PermissionList : PermissionList; _authorized = IsAuthorized(); @@ -207,6 +223,15 @@ else _visible = (PageState.QueryString["dialog"] == Id); } } + /// + /// Checks the Class that is used for the Action Button, if it is small make the Cancel Button small as well. + /// + /// + /// + private string GetButtonSize() + { + return Class.Contains("btn-sm", StringComparison.OrdinalIgnoreCase) ? "btn-sm" : string.Empty; + } private bool IsAuthorized() {