Merge branch 'master' into 3408-production-datamanager
[arvados.git] / apps / workbench / app / views / application / report_issue_popup.js.erb
1 $("#report-issue-modal-window").html("<%= escape_javascript(render partial: 'report_issue_popup') %>");
2 $("#report-issue-modal-window .modal").modal('show');
3
4 // Disable the submit button on modal loading
5 $submit = $('#report-issue-submit');
6 $submit.prop('disabled', true);
7
8 // capture events to enable submit button when applicable
9 $('#report_issue_text').bind('input propertychange', function() {
10   var problem_desc = document.forms["report-issue-form"]["report_issue_text"].value;
11   $submit.prop('disabled', (problem_desc === null) || (problem_desc === ""));
12 });