1 $("#report-issue-modal-window").html("<%= escape_javascript(render partial: 'report_issue_popup') %>");
2 $("#report-issue-modal-window .modal").modal('show');
4 // Disable the submit button on modal loading
5 $submit = $('#report-issue-submit');
6 $submit.prop('disabled', true);
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 === ""));