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

35 lines
946 B
Plaintext
Raw Normal View History

2016-07-31 14:47:15 -05:00
<main class="intro_tpl">
<h1>New Candidate</h1>
<% if flash[:error].present? %>
<div class="error">
<%= flash[:error] %>
2016-08-01 16:43:05 -05:00
<p>
<% @candidate.errors.messages.each do |k,v| %>
<%= "#{k.to_s} #{v.join(' and ')}" %><br />
<% end %>
</p>
2016-07-31 14:47:15 -05:00
</div>
<% end %>
<%= form_for @candidate, url: create_candidate_path do |form| %>
<div class="form-group">
2016-08-04 08:52:04 -05:00
<%= form.label :name, "Candidate name" %>
2016-07-31 14:47:15 -05:00
<%= form.text_field :name %>
</div>
<div class="form-group">
2016-08-04 08:52:04 -05:00
<%= form.label :email, "Candidate email" %>
2016-07-31 14:47:15 -05:00
<%= form.email_field :email %>
</div>
<div class="form-group">
2016-08-04 08:52:04 -05:00
<%= form.label :experience, "Years of experience" %>
2016-07-31 14:47:15 -05:00
<%= form.select :experience, experience_options(@candidate.experience), include_blank: false %>
</div>
<%= form.hidden_field :quiz_id, { value: Quiz.first.to_i } %>
2016-08-04 08:52:04 -05:00
<%= submit_tag "Create" %>
2016-07-31 14:47:15 -05:00
<% end %>
</main>