mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
security/acme-client: replace the std dialog, title "Remove" was never fitting
This commit is contained in:
+21
-2
@@ -119,6 +119,25 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* standard dialog when confirmation is required, wrapper around BootstrapDialog
|
||||
*/
|
||||
function stdDialogConfirmation(message, callback) {
|
||||
BootstrapDialog.confirm({
|
||||
title: 'Confirmation Required',
|
||||
message: message,
|
||||
type:BootstrapDialog.TYPE_DANGER,
|
||||
btnCancelLabel: 'Cancel',
|
||||
btnOKLabel: 'Yes',
|
||||
btnOKClass: 'btn-primary',
|
||||
callback: function(result) {
|
||||
if(result) {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* reload bootgrid, return to current selected page
|
||||
*/
|
||||
@@ -315,7 +334,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
{
|
||||
if (gridParams['sign'] != undefined) {
|
||||
var uuid=$(this).data("row-id");
|
||||
stdDialogRemoveItem('Forcefully (re-)issue the selected certificate?',function() {
|
||||
stdDialogConfirmation('Forcefully (re-)issue the selected certificate?',function() {
|
||||
// Handle HAProxy integration (no-op if not applicable)
|
||||
ajaxCall(url="/api/acmeclient/settings/fetchHAProxyIntegration", sendData={}, callback=function(data,status) {
|
||||
ajaxCall(url=gridParams['sign'] + uuid,sendData={},callback=function(data,status){
|
||||
@@ -335,7 +354,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
{
|
||||
if (gridParams['revoke'] != undefined) {
|
||||
var uuid=$(this).data("row-id");
|
||||
stdDialogRemoveItem('Revoke selected certificate?',function() {
|
||||
stdDialogConfirmation('Revoke selected certificate?',function() {
|
||||
ajaxCall(url=gridParams['revoke'] + uuid,
|
||||
sendData={},callback=function(data,status){
|
||||
// reload grid after sign
|
||||
|
||||
Reference in New Issue
Block a user