mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Allow form validation messages to be close in case the eclipse anything on the form. Fixes #2859
This commit is contained in:
committed by
Dave Page
parent
9ae4a03784
commit
5bfa450a5f
@@ -265,10 +265,16 @@ define(
|
||||
<i class="fa fa-exclamation-triangle" aria-hidden="true"></i>\
|
||||
</div>\
|
||||
<div class="alert-text">' + msg + '</div>\
|
||||
<div class="close-error-bar">\
|
||||
<a class="close-error">x</a>\
|
||||
</div>\
|
||||
</div>\
|
||||
</div>';
|
||||
if(!_.isUndefined(that.statusBar)) {
|
||||
that.statusBar.html(alertMessage).css("visibility", "visible");
|
||||
that.statusBar.find("a.close-error").bind("click", function(e) {
|
||||
this.empty().css("visibility", "hidden");
|
||||
}.bind(that.statusBar));
|
||||
}
|
||||
callback(true);
|
||||
|
||||
|
||||
@@ -96,6 +96,9 @@ function(_, Backbone, pgAdmin, pgBrowser) {
|
||||
+ " </div>"
|
||||
+ " <div class='alert-text'>"
|
||||
+ " </div>"
|
||||
+ " <div class='close-error-bar'>"
|
||||
+ " <a class='close-error'>x</a>"
|
||||
+ " </div>"
|
||||
+ " </div>"
|
||||
+ " </div>"
|
||||
+ " </div>"
|
||||
@@ -128,6 +131,7 @@ function(_, Backbone, pgAdmin, pgBrowser) {
|
||||
"click button.wizard-maximize-event" : "onMaximize",
|
||||
"click button.wizard-finish" : "finishWizard",
|
||||
"click button.wizard-help" : "onDialogHelp",
|
||||
"click a.close-error" : "closeErrorMsg",
|
||||
},
|
||||
initialize: function(options) {
|
||||
this.options = _.extend({}, this.options, options.options);
|
||||
@@ -224,6 +228,10 @@ function(_, Backbone, pgAdmin, pgBrowser) {
|
||||
this.options.disable_prev = false;
|
||||
}
|
||||
},
|
||||
closeErrorMsg: function() {
|
||||
$(this.el).find('.pg-prop-status-bar .alert-text').empty();
|
||||
$(this.el).find('.pg-prop-status-bar').css("visibility", "hidden");
|
||||
},
|
||||
beforeNext: function(){
|
||||
return this.evalASFunc(this.currPage.beforeNext);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user