diff --git a/frontend/express/public/javascripts/countly/vue/components/dialog.js b/frontend/express/public/javascripts/countly/vue/components/dialog.js index ec3ac7d59e9..17d4e322afc 100644 --- a/frontend/express/public/javascripts/countly/vue/components/dialog.js +++ b/frontend/express/public/javascripts/countly/vue/components/dialog.js @@ -48,8 +48,10 @@ title: {type: String, required: true}, saveButtonLabel: {type: String, required: false, default: CV.i18n("common.save")}, saveButtonVisibility: {type: Boolean, required: false, default: true}, + saveButtonDisabled: {type: Boolean, required: false, default: false}, cancelButtonLabel: {type: String, required: false, default: CV.i18n("common.cancel")}, cancelButtonVisibility: {type: Boolean, required: false, default: true}, + cancelButtonDisabled: {type: Boolean, required: false, default: false}, dialogType: {type: String, required: false, default: "success"}, testId: {type: String, default: 'cly-vue-confirm-dialog-test-id', required: false}, alignCenter: {type: Boolean, default: true} @@ -76,6 +78,17 @@ }, customClass: function() { return this.alignCenter ? "el-dialog--centered" : ""; + }, + isButtonDisabled: function() { + return { + save: this.saveButtonDisabled, + cancel: this.cancelButtonDisabled + }; + }, + buttonStyle: function() { + return function(disabled) { + return disabled ? { opacity: 0.5 } : {}; + }; } }, methods: { @@ -92,10 +105,10 @@ \ \ \ ' }));