closes #3177
[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.attr('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   if (problem_desc === null || problem_desc === "") {
12     $submit.attr('disabled', true)
13   } else {
14     $submit.removeAttr('disabled');
15   }
16 });