admin a11y polish
This commit is contained in:
parent
9368184aa8
commit
b961fe7553
@ -28,7 +28,8 @@ class Candidate < ApplicationRecord
|
||||
|
||||
def interview?
|
||||
return 'yes' if approved?
|
||||
'no' if declined?
|
||||
return 'no' if declined?
|
||||
'-'
|
||||
end
|
||||
|
||||
def build_reviews
|
||||
|
@ -21,7 +21,9 @@
|
||||
<%= form.text_field :project %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div role="group" aria-labelledby="position-type">
|
||||
<span id="position-type">Position Type</span>
|
||||
|
||||
<%= form.radio_button :position, 'full-time' %>
|
||||
<%= form.label "position_full-time", "Full-time" %>
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
<td><%= candidate.experience %> years</td>
|
||||
<td><%= candidate.status %></td>
|
||||
<td><%= candidate.completed ? link_to("Submitted", admin_result_path(candidate.test_hash)) : "" %></td>
|
||||
<td><%= candidate.reminded ? "Yes" : "" %></td>
|
||||
<td><%= raw candidate.reminded ? "✓" : "·" %></td>
|
||||
<td><%= candidate.interview? %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
@ -3,6 +3,8 @@
|
||||
content_for :title, "Profile - Skills Assessment Admin"
|
||||
%>
|
||||
|
||||
<h1>Edit Profile</h1>
|
||||
|
||||
<%= render partial: 'shared/form_model_errors', locals: {obj: @user} %>
|
||||
|
||||
<%= form_for @user, url: admin_profile_url, method: :post do |form| %>
|
||||
|
@ -14,7 +14,7 @@
|
||||
<td><%= question.question %></td>
|
||||
<td><%= question.input_type %></td>
|
||||
<td><%= question.category %></td>
|
||||
<td><%= question.active unless question.active? %></td>
|
||||
<td><%= raw question.active? ? "✓" : "✗" %></td>
|
||||
<td><%= link_to 'Edit', admin_edit_question_path(question.to_i), { class: "" } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
@ -27,16 +27,18 @@
|
||||
<% if current_user.acts_as_manager? %>
|
||||
<div>
|
||||
<%= form_tag admin_interview_path(test_hash: @candidate.test_hash) do %>
|
||||
<strong>Interview: </strong>
|
||||
<div role="group" aria-labelledby="interview-status">
|
||||
<strong id="interview-status">Interview: </strong>
|
||||
|
||||
<%= radio_button_tag :review_status, :approved, checked = @candidate.approved? %>
|
||||
<%= label_tag :review_status_approved, "Yes" %>
|
||||
|
||||
<%= radio_button_tag :review_status, :declined, checked = @candidate.declined? %>
|
||||
<%= label_tag :review_status_declined, "No" %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span>Review comments for recruiter</span>
|
||||
<%= label_tag :review_comments, "Review comments for recruiter" %>
|
||||
<%= text_area_tag :review_comments, @candidate.review_comments %>
|
||||
<%= submit_tag 'Send Request' %>
|
||||
</div>
|
||||
|
@ -18,11 +18,12 @@
|
||||
</div>
|
||||
|
||||
<% @quiz.each do |question| %>
|
||||
<%= form_for(:answer, url: '#never-post', html:{id: 'summary-form'}) do |form| %>
|
||||
<%= form_for(:answer, url: '#never-post', html:{id: "summary-#{question.to_i}"}) do |form| %>
|
||||
<h2><%= question.question %></h2>
|
||||
<%= image_tag question.attachment if question.attachment.present? %>
|
||||
|
||||
<fieldset disabled>
|
||||
<legend>Response</legend>
|
||||
<%= render partial: "quiz/#{question.input_type}", locals: {question: question, answer: question.answer, form: form} %>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
|
@ -16,16 +16,17 @@
|
||||
<%= form.select :role, admin_role_options(user.role), include_blank: false %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div><strong>Quiz Review List</strong></div>
|
||||
<div role="group" aria-labelledby="assigned-quiz-list">
|
||||
<div id="assigned-quiz-list"><strong>Quiz Review List</strong></div>
|
||||
<p>
|
||||
Quizzes this user should be reviewing the results of.<br />
|
||||
Admins and Recruiters should not have any checked, unless they are expected
|
||||
to participate in the technical review for that quiz.
|
||||
</p>
|
||||
|
||||
<%= hidden_field_tag('user[quiz_ids][]') %>
|
||||
<ul>
|
||||
<%= form.collection_check_boxes(:quiz_ids, Quiz.all, :id, :name, {}, {class: ""}) do | quiz | %>
|
||||
<%= form.collection_check_boxes(:quiz_ids, Quiz.all, :id, :name, {include_hidden: false}, {class: ""}) do | quiz | %>
|
||||
<li>
|
||||
<%= quiz.check_box( checked: user.quizzes.include?(quiz.object)) %>
|
||||
<%= quiz.label %>
|
||||
|
Loading…
Reference in New Issue
Block a user