skill-assessment-app/app/views/recruiter/form.html.erb

29 lines
916 B
Plaintext

<main class="intro_tpl">
<h1>New Candidate</h1>
<%= render partial: 'shared/form_model_errors', locals: { obj: @candidate } %>
<%= form_for @candidate, url: create_candidate_path do |form| %>
<div class="form-group">
<%= form.label :name, "Candidate name" %>
<%= form.text_field :name %>
</div>
<div class="form-group">
<%= form.label :email, "Candidate email" %>
<%= form.email_field :email %>
</div>
<div class="form-group">
<%= form.label :experience, "Years of experience" %>
<%= form.select :experience, experience_options(@candidate.experience), include_blank: false %>
</div>
<div class="form-group">
<%= form.label :quiz_id, "Quiz" %>
<%= form.select :quiz_id, options_from_collection_for_select(@quizzes, 'id', 'name'), include_blank: (@quizzes.size > 1) %>
</div>
<%= submit_tag "Create" %>
<% end %>
</main>