<% # Copyright (C) 2011 - present Instructure, Inc. # # This file is part of Canvas. # # Canvas is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation, version 3 of the License. # # Canvas is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Affero General Public License for more # details. # # You should have received a copy of the GNU Affero General Public License along # with this program. If not, see . %> <% error_category ||= '404' %>
<%= hidden_field :error, :category, :value => error_category %> <%= hidden_field :error, :id, :value => (@error.try(:id)) %> <%= hidden_field :error, :url, :value => (request.url rescue "") %>
<%= text_field :error, :username, :value => "" %><%# this is a honeypot field. it's hidden via css, but spambots don't know that. %> <%= text_area :error, :comments, :style => "width: 100%; height: 100px; border: 1px solid #888;" %> <% if @current_user %> <%= before_label('email_optional', %{Email (optional)}) %> <%= hidden_field :error, :user_roles, :value => @current_user.try(:roles, @domain_root_account).join(',') %> <% else %> <%= before_label('email_required', %{Email (required)}) %> <% end %> <%= text_field :error, :email, :value => (@current_user.email rescue ""), :style => "border: 1px solid #888;" %>
<% js_bundle 'error_form' %>