35 lines
884 B
Plaintext
35 lines
884 B
Plaintext
<main class="intro_tpl">
|
|
<h1>New Candidate</h1>
|
|
|
|
<% if flash[:error].present? %>
|
|
<div class="error">
|
|
<%= flash[:error] %>
|
|
<p>
|
|
<% @candidate.errors.messages.each do |k,v| %>
|
|
<%= "#{k.to_s} #{v.join(' and ')}" %><br />
|
|
<% end %>
|
|
</p>
|
|
</div>
|
|
<% end %>
|
|
|
|
<%= form_for @candidate, url: create_candidate_path do |form| %>
|
|
<div class="form-group">
|
|
<%= form.label :name %>
|
|
<%= form.text_field :name %>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<%= form.label :email %>
|
|
<%= form.email_field :email %>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<%= form.label :experience %>
|
|
<%= form.select :experience, experience_options(@candidate.experience), include_blank: false %>
|
|
</div>
|
|
|
|
<%= form.hidden_field :quiz_id, { value: Quiz.first.to_i } %>
|
|
<%= submit_tag "Save" %>
|
|
<% end %>
|
|
</main>
|