diff --git a/frontends/php/app/views/popup.preproctestedit.view.js.php b/frontends/php/app/views/popup.preproctestedit.view.js.php
index 283174f..bef64c2 100644
--- a/frontends/php/app/views/popup.preproctestedit.view.js.php
+++ b/frontends/php/app/views/popup.preproctestedit.view.js.php
@@ -69,7 +69,7 @@ function itemPreprocessingTest(form) {
 				jQuery('#prev_value, #prev_time').prop('disabled', true);
 			}
 
-			jQuery('.submit-test-btn').prop('disabled', true).addClass('is-loading').blur();
+			overlays_stack.getById('preprocessing-test').enableLoadingState();
 
 			// Clean previous results.
 			jQuery('[id^="preproc-test-step-"][id$="-result"]').empty();
@@ -106,7 +106,7 @@ function itemPreprocessingTest(form) {
 				jQuery('#prev_value, #prev_time').prop('disabled', false);
 			}
 
-			jQuery('.submit-test-btn').prop('disabled', false).removeClass('is-loading');
+			overlays_stack.getById('preprocessing-test').disableLoadingState();
 		},
 		dataType: 'json',
 		type: 'post'
diff --git a/frontends/php/app/views/popup.triggerwizard.js.php b/frontends/php/app/views/popup.triggerwizard.js.php
index a7a3c65..35b490f 100644
--- a/frontends/php/app/views/popup.triggerwizard.js.php
+++ b/frontends/php/app/views/popup.triggerwizard.js.php
@@ -159,6 +159,9 @@ function validateTriggerWizard(formname, dialogueid) {
 	jQuery.ajax({
 		url: url.getUrl(),
 		data: jQuery(form).serialize(),
+		beforeSend: function() {
+			overlays_stack.getById('triggerwizard').enableLoadingState();
+		},
 		success: function(ret) {
 			jQuery(form).parent().find('.<?= ZBX_STYLE_MSG_BAD ?>, .<?= ZBX_STYLE_MSG_GOOD ?>').remove();
 
@@ -169,6 +172,8 @@ function validateTriggerWizard(formname, dialogueid) {
 				overlayDialogueDestroy(dialogueid);
 				window.location.replace(window.location.href);
 			}
+
+			overlays_stack.getById('triggerwizard').disableLoadingState();
 		},
 		dataType: 'json',
 		type: 'post'
diff --git a/frontends/php/include/defines.inc.php b/frontends/php/include/defines.inc.php
index 4d90cb2..30fa67a 100644
--- a/frontends/php/include/defines.inc.php
+++ b/frontends/php/include/defines.inc.php
@@ -21,7 +21,7 @@
 define('ZABBIX_VERSION',		'5.0.0alpha1');
 define('ZABBIX_API_VERSION',	'5.0.0');
 define('ZABBIX_EXPORT_VERSION',	'4.4');
-define('ZABBIX_DB_VERSION',		4050009);
+define('ZABBIX_DB_VERSION',		4050013);
 
 define('ZABBIX_COPYRIGHT_FROM',	'2001');
 define('ZABBIX_COPYRIGHT_TO',	'2019');
diff --git a/frontends/php/include/views/configuration.trigger.prototype.edit.php b/frontends/php/include/views/configuration.trigger.prototype.edit.php
index 0e89162..99a2801 100644
--- a/frontends/php/include/views/configuration.trigger.prototype.edit.php
+++ b/frontends/php/include/views/configuration.trigger.prototype.edit.php
@@ -247,8 +247,8 @@ if ($data['expression_constructor'] == IM_TREE) {
 	}
 
 	$testButton = (new CButton('test_expression', _('Test')))
-		->onClick('return PopUp("popup.testtriggerexpr",{expression: this.form.elements["expression"].value}, null,'.
-					'this);')
+		->onClick('return PopUp("popup.testtriggerexpr",{expression: this.form.elements["expression"].value},'.
+					'"trigger-expression-test", this);')
 		->addClass(ZBX_STYLE_BTN_LINK)
 		->removeId();
 	if (!$allowed_testing) {
@@ -444,7 +444,7 @@ if ($data['recovery_expression_constructor'] == IM_TREE) {
 
 	$testButton = (new CButton('test_expression', _('Test')))
 		->onClick('return PopUp("popup.testtriggerexpr",'.
-			'{expression: this.form.elements["recovery_expression"].value}, null, this);')
+			'{expression: this.form.elements["recovery_expression"].value}, "trigger-expression-test", this);')
 		->addClass(ZBX_STYLE_BTN_LINK)
 		->removeId();
 	if (!$allowed_testing) {
diff --git a/frontends/php/include/views/configuration.triggers.edit.php b/frontends/php/include/views/configuration.triggers.edit.php
index 7e81a3f..334376d 100644
--- a/frontends/php/include/views/configuration.triggers.edit.php
+++ b/frontends/php/include/views/configuration.triggers.edit.php
@@ -269,8 +269,8 @@ if ($data['expression_constructor'] == IM_TREE) {
 	}
 
 	$testButton = (new CButton('test_expression', _('Test')))
-		->onClick('return PopUp("popup.testtriggerexpr",{expression: this.form.elements["expression"].value}, null,'.
-					'this);')
+		->onClick('return PopUp("popup.testtriggerexpr",{expression: this.form.elements["expression"].value},'.
+					'"trigger-expression-test", this);')
 		->addClass(ZBX_STYLE_BTN_LINK)
 		->removeId();
 
@@ -467,9 +467,9 @@ if ($data['recovery_expression_constructor'] == IM_TREE) {
 		$data['recovery_expression_formula'] = '';
 	}
 
-	$testButton = (new CButton('test_expression', _('Test')))
+	$testButton = (new CButton('test_expression', _('Test...')))
 		->onClick('return PopUp("popup.testtriggerexpr",'.
-			'{expression: this.form.elements["recovery_expression"].value}, null, this);')
+			'{expression: this.form.elements["recovery_expression"].value}, "trigger-expression-test", this);')
 		->addClass(ZBX_STYLE_BTN_LINK)
 		->removeId();
 
diff --git a/frontends/php/include/views/js/configuration.httpconf.edit.js.php b/frontends/php/include/views/js/configuration.httpconf.edit.js.php
index e45e655..acd1ad8 100644
--- a/frontends/php/include/views/js/configuration.httpconf.edit.js.php
+++ b/frontends/php/include/views/js/configuration.httpconf.edit.js.php
@@ -781,7 +781,7 @@
 			retrieve_mode:    this.data.retrieve_mode,
 			follow_redirects: this.data.follow_redirects,
 			steps_names:      httpconf.steps.getStepNames()
-		}, null, refocus);
+		}, 'httpconf-step', refocus);
 	};
 
 	/**
@@ -1064,7 +1064,10 @@
 			url: url.getUrl(),
 			data: this.$form.serialize(),
 			dataType: 'json',
-			type: 'post'
+			type: 'post',
+			beforeSend: function() {
+				overlays_stack.getById('httpconf-step').enableLoadingState();
+			}
 		})
 		.done(function(ret) {
 			if (typeof ret.errors !== 'undefined') {
@@ -1081,6 +1084,8 @@
 			httpconf.steps.renderData();
 
 			overlayDialogueDestroy(dialogueid);
-		}.bind(this));
+		}.bind(this)).then(function() {
+			overlays_stack.getById('httpconf-step').disableLoadingState();
+		});
 	};
 </script>
diff --git a/frontends/php/js/class.overlay.js b/frontends/php/js/class.overlay.js
index ac75350..648ad1a 100644
--- a/frontends/php/js/class.overlay.js
+++ b/frontends/php/js/class.overlay.js
@@ -164,6 +164,17 @@ Overlay.prototype.containFocus = function() {
 	}
 };
 
+Overlay.prototype.enableLoadingState = function() {
+	this.$dialogue.$body.addClass('is-loading');
+	this.$dialogue.$controls.find('select').prop('disabled', true);
+	this.$btn_submit && this.$btn_submit.prop('disabled', true).addClass('is-loading');
+};
+
+Overlay.prototype.disableLoadingState = function() {
+	this.$dialogue.$body.removeClass('is-loading');
+	this.$btn_submit && this.$btn_submit.prop('disabled', false).removeClass('is-loading');
+};
+
 /**
  * @param {string} action
  * @param {array|object} options (optional)
@@ -178,9 +189,7 @@ Overlay.prototype.load = function(action, options) {
 		this.xhr.abort();
 	}
 
-	this.$dialogue.$body.addClass('is-loading');
-	this.$dialogue.$controls.find('select').prop('disabled', true);
-	this.$btn_submit && this.$btn_submit.prop('disabled', true);
+	this.enableLoadingState();
 
 	this.xhr = jQuery.ajax({
 		url: url.getUrl(),
@@ -190,8 +199,7 @@ Overlay.prototype.load = function(action, options) {
 	});
 
 	this.xhr.always(function() {
-		this.$dialogue.$body.removeClass('is-loading');
-		this.$btn_submit && this.$btn_submit.prop('disabled', false);
+		this.disableLoadingState();
 	}.bind(this));
 
 	return this.xhr;
diff --git a/frontends/php/js/common.js b/frontends/php/js/common.js
index 8365310..1bcf7cc 100644
--- a/frontends/php/js/common.js
+++ b/frontends/php/js/common.js
@@ -649,6 +649,9 @@ function validate_trigger_expression(formname, dialogueid) {
 	jQuery.ajax({
 		url: url.getUrl(),
 		data: jQuery(form).serialize(),
+		beforeSend: function() {
+			overlays_stack.getById('trigger-expression-test').enableLoadingState();
+		},
 		success: function(ret) {
 			jQuery(window.document.forms[formname]).parent().find('.msg-bad, .msg-good').remove();
 
@@ -673,6 +676,9 @@ function validate_trigger_expression(formname, dialogueid) {
 				}
 			}
 		},
+		always: function() {
+			overlays_stack.getById('trigger-expression-test').disableLoadingState();
+		},
 		dataType: 'json',
 		type: 'post'
 	});
diff --git a/frontends/php/js/menupopup.js b/frontends/php/js/menupopup.js
index 426403a..bfe7320 100644
--- a/frontends/php/js/menupopup.js
+++ b/frontends/php/js/menupopup.js
@@ -696,7 +696,7 @@ function getMenuPopupItem(options, trigger_elmnt) {
 
 				return PopUp('popup.triggerwizard', {
 					itemid: options.itemid
-				}, null, trigger_elmnt);
+				}, 'triggerwizard', trigger_elmnt);
 			}
 		});
 
@@ -717,7 +717,7 @@ function getMenuPopupItem(options, trigger_elmnt) {
 						return PopUp('popup.triggerwizard', {
 							itemid: options.itemid,
 							triggerid: trigger.triggerid
-						}, null, trigger_elmnt);
+						}, 'triggerwizard', trigger_elmnt);
 					}
 				});
 			});
