3112: and it would help if that said partial is committed :)
authorradhika <radhika@curoverse.com>
Wed, 20 Aug 2014 21:37:17 +0000 (17:37 -0400)
committerradhika <radhika@curoverse.com>
Wed, 20 Aug 2014 21:37:17 +0000 (17:37 -0400)
apps/workbench/app/views/application/_report_error.html.erb [new file with mode: 0644]
apps/workbench/app/views/application/report_issue_popup.js.erb

diff --git a/apps/workbench/app/views/application/_report_error.html.erb b/apps/workbench/app/views/application/_report_error.html.erb
new file mode 100644 (file)
index 0000000..f79a769
--- /dev/null
@@ -0,0 +1,17 @@
+<p>
+<br/><strong>If you suspect this is a bug, you can help us fix it by sending us a problem report:</strong></br></br>
+<% if api_error %>
+  Send a problem report right here. <%= link_to report_issue_popup_path(popup_type: 'report', current_location: request.url, action_method: 'post', api_error_request_url: api_error.request_url, api_error_response: api_error.api_response_s),
+        {class: 'btn btn-primary report-issue-modal-window', 'data-toggle' =>  "modal", 'data-target' => '#report-issue-modal-window', :remote => true, return_to: request.url} do %>
+        <i class="fa fa-fw fa-support"></i> Report problem
+  <% end %>
+<% else %>
+  Send a problem report right here. <%= link_to report_issue_popup_path(popup_type: 'report', current_location: request.url, action_method: 'post', error_message: error_message),
+        {class: 'btn btn-primary report-issue-modal-window', 'data-toggle' =>  "modal", 'data-target' => '#report-issue-modal-window', :remote => true, return_to: request.url} do %>
+        <i class="fa fa-fw fa-support"></i> Report problem
+  <% end %>
+<% end %>
+<% support_email = Rails.configuration.support_email_address%>
+<br/></br>
+  If you prefer email, send to: <a href="mailto:<%=support_email%>?subject=Workbench problem report&body=Problem while viewing page <%=request.url%>"><%=support_email%></a>
+</p>
index 799a8812a06a9f0797dc382d085199612c644e75..93e9a5a84089b718d6805c286e2a02d768adf8b4 100644 (file)
@@ -28,14 +28,14 @@ $(document).
       var text = document.getElementById('report-issue-submit').firstChild;
       text.data = "Report sent";
       $('div').remove('.modal-footer-status');
-      $('.modal-footer').append('<div class="modal-footer-status pull-left alert alert-success"><div><p>Thanks for reporting this issue!</p></div></div>');
+      $('.modal-footer').append('<div class="modal-footer-status alert alert-success"><div><p align="left">Thanks for reporting this issue!</p></div></div>');
     }
   }).
   on('ajax:failure', function() {
     var sendButton = document.getElementById('report-issue-submit');
     if (sendButton && sendButton.disabled) {
       $('div').remove('.modal-footer-status');
-      $('.modal-footer').append('<div class="modal-footer-status pull-left alert alert-danger"></br><p>We are sorry. We could not submit your report! We really want this to work, though -- please try again.</p></div>');
+      $('.modal-footer').append('<div class="modal-footer-status alert alert-danger"></br><p align="left">We are sorry. We could not submit your report! We really want this to work, though -- please try again.</p></div>');
       var text = document.getElementById('report-issue-submit').firstChild;
       text.data = "Report issue";
       sendButton.disabled = false;