--- /dev/null
+<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>
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;