[ARVADOS] updated: d2804a5fc6132a8c1067eafde336e70dd841a61b

git at public.curoverse.com git at public.curoverse.com
Wed Aug 27 17:27:00 EDT 2014


Summary of changes:
 .../views/application/_report_issue_popup.html.erb    |  2 +-
 .../app/views/application/report_issue_popup.js.erb   | 19 +++++++++++++++++++
 2 files changed, 20 insertions(+), 1 deletion(-)

       via  d2804a5fc6132a8c1067eafde336e70dd841a61b (commit)
      from  0042e4b42d9f4d3900aefc68617cb28c5a61a522 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit d2804a5fc6132a8c1067eafde336e70dd841a61b
Author: radhika <radhika at curoverse.com>
Date:   Wed Aug 27 17:21:19 2014 -0400

    3714: disable submit button until problem description is entered.

diff --git a/apps/workbench/app/views/application/_report_issue_popup.html.erb b/apps/workbench/app/views/application/_report_issue_popup.html.erb
index f032d61..fe47fb0 100644
--- a/apps/workbench/app/views/application/_report_issue_popup.html.erb
+++ b/apps/workbench/app/views/application/_report_issue_popup.html.erb
@@ -62,7 +62,7 @@
           <div class="form-group">
             <label for="report_text_label" class="col-sm-4 control-label"> Describe the problem </label>
             <div class="col-sm-8">
-              <textarea class="form-control" rows="4" id="report_issue_text" name="report_issue_text" type="text"/>
+              <textarea class="form-control" rows="4" id="report_issue_text" name="report_issue_text" type="text" placeholder="Describe the problem"/>
             </div>
             <input type="hidden" name="report_additional_info" value="<%=additional_info.to_json%>">
           </div>
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 5c15db3..a130665 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,21 @@
 $("#report-issue-modal-window").html("<%= escape_javascript(render partial: 'report_issue_popup') %>");
 $("#report-issue-modal-window .modal").modal('show');
+
+// Disable the submit button until the problem description is entered
+$submit = $('#report-issue-submit');
+
+var problem_desc = document.forms["report-issue-form"]["report_issue_text"].value;
+if (problem_desc == null || problem_desc == "") {
+  $submit.attr('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;
+
+  var trigger = false;
+  if (problem_desc == null || problem_desc == "") {
+    trigger = true;
+  }
+  trigger ? $submit.attr('disabled', true) : $submit.removeAttr('disabled');
+});

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list