Commit 268db908 by Saleem Latif Committed by Matt Drayer

Disable 'Generate Exception Certificates' button when there are no certificate exceptions.

parent 5ccc520b
...@@ -32,7 +32,12 @@ ...@@ -32,7 +32,12 @@
render: function(){ render: function(){
var template = this.loadTemplate('certificate-white-list'); var template = this.loadTemplate('certificate-white-list');
this.$el.html(template({certificates: this.collection.models})); this.$el.html(template({certificates: this.collection.models}));
if (this.collection.isEmpty()) {
this.$("#generate-exception-certificates").addClass("is-disabled");
}
else {
this.$("#generate-exception-certificates").removeClass("is-disabled");
}
}, },
loadTemplate: function(name) { loadTemplate: function(name) {
......
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