(ui) replace stdDialogRemoveItem(), emulate for backwards compatiblilty

This commit is contained in:
Frank Wall 2017-08-03 18:01:27 +02:00 committed by Franco Fichtner
parent ec58aadd94
commit fb6125ccb2

View File

@ -271,15 +271,15 @@ function initFormAdvancedUI() {
}
/**
* standard remove items dialog, wrapper around BootstrapDialog
* standard dialog when confirmation is required, wrapper around BootstrapDialog
*/
function stdDialogRemoveItem(message, callback) {
function stdDialogConfirmation(title, message, accept, decline, callback) {
BootstrapDialog.confirm({
title: 'Remove',
title: title,
message: message,
type:BootstrapDialog.TYPE_DANGER,
btnCancelLabel: 'Cancel',
btnOKLabel: 'Yes',
btnCancelLabel: decline,
btnOKLabel: accept,
btnOKClass: 'btn-primary',
callback: function(result) {
if(result) {
@ -288,3 +288,10 @@ function stdDialogRemoveItem(message, callback) {
}
});
}
/**
* wrapper for backwards compatibility
*/
function stdDialogRemoveItem(message, callback) {
stdDialogConfirmation('Remove', message, 'Yes', 'Cancel', callback)
}