X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/bd1f0b637be6c97374b31ed5c442ff88d25e626e..42c20b25e1325124b88e3b9b285544dc41122b56:/apps/workbench/app/views/application/report_issue_popup.js.erb diff --git a/apps/workbench/app/views/application/report_issue_popup.js.erb b/apps/workbench/app/views/application/report_issue_popup.js.erb index 5c15db3d71..bd11f9e1dc 100644 --- a/apps/workbench/app/views/application/report_issue_popup.js.erb +++ b/apps/workbench/app/views/application/report_issue_popup.js.erb @@ -1,2 +1,16 @@ +<%# Copyright (C) The Arvados Authors. All rights reserved. + +SPDX-License-Identifier: AGPL-3.0 %> + $("#report-issue-modal-window").html("<%= escape_javascript(render partial: 'report_issue_popup') %>"); $("#report-issue-modal-window .modal").modal('show'); + +// Disable the submit button on modal loading +$submit = $('#report-issue-submit'); +$submit.prop('disabled', true); + +// capture events to enable submit button when applicable +$('#report_issue_text').bind('input propertychange', function() { + var problem_desc = document.forms["report-issue-form"]["report_issue_text"].value; + $submit.prop('disabled', (problem_desc === null) || (problem_desc === "")); +});