Commit a10760dc authored by Kostas Papadimitriou's avatar Kostas Papadimitriou Committed by Christos Stavrakakis
Browse files

ui: Prevent snapshot create submit while an snapshot create call is in progress

parent c74ac94f
......@@ -71,6 +71,7 @@
this.description = this.$(".snapshot-create-desc");
this.form = this.$("form");
this.init_handlers();
this.creating = false;
},
show: function(vm) {
......@@ -118,12 +119,15 @@
},
create: function() {
if (this.creating) { return }
this.create_button.addClass("in-progress");
var name = this.text.val();
var desc = this.description.val();
this.creating = true;
this.vm.create_snapshot({display_name:name, display_description:desc}, _.bind(function() {
this.creating = false;
this.hide();
}, this));
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment