1 <%# Copyright (C) The Arvados Authors. All rights reserved.
3 SPDX-License-Identifier: AGPL-3.0 %>
5 $("#report-issue-modal-window").html("<%= escape_javascript(render partial: 'report_issue_popup') %>");
6 $("#report-issue-modal-window .modal").modal('show');
8 // Disable the submit button on modal loading
9 $submit = $('#report-issue-submit');
10 $submit.prop('disabled', true);
12 // capture events to enable submit button when applicable
13 $('#report_issue_text').bind('input propertychange', function() {
14 var problem_desc = document.forms["report-issue-form"]["report_issue_text"].value;
15 $submit.prop('disabled', (problem_desc === null) || (problem_desc === ""));