app/views/teachers/_form.html.erb
<%= render "layouts/navbar" %>
<%= form_for (@teacher) do |f| %>
<% if @teacher.errors.any? %>
<div class="container">
<div class="text-danger text-justify">
<div id="error_explanation">
<h2 class=""><%= pluralize(@teacher.errors.count, "erro") %> proibiram este formulario de ser salvo:</h2>
<ul>
<% @teacher.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
</div>
</div>
<% end %>
<div class="form-group">
<%= f.label :name, class:"sr-only" %>
<div class="input-group">
<span class="input-group-addon">
<span class="fa fa-user"></span>
Nome
</span>
<%= f.text_field :name, class:"form-control", placeholder:"Nome do usuário" %>
</div>
</div>
<div class="form-group">
<%= f.label :registry, class:"sr-only" %>
<div class="input-group">
<span class="input-group-addon">
<span class="fa fa-id-card"></span>
Matricula
</span>
<%= f.number_field :registry, class:"form-control", placeholder:"Ex.: 153456" %>
</div>
</div>
<div class="form-group">
<%= f.label :employee_cpf, class:"sr-only" %>
<div class="input-group">
<span class="input-group-addon">
<span class="fa fa-id-badge"></span>
CPF
</span>
<%= f.text_field :employee_cpf, class:"form-control", placeholder:"Ex.: 153456" %>
</div>
</div>
<div class="form-group">
<%= f.label :classroom_id, class:"sr-only", id: "sel1" %>
<div class="input-group">
<span class="input-group-addon">
<span class="fa fa-clock-o"></span>
Turno
</span>
<%= f.select :shift_id, @shifts.collect {|shift| [shift.name_shift, shift.id]}, {:include_blank => false}, {:class => "form-control", :id => "sel1"}%>
</div>
</div>
<div class="form-group">
<%= f.label :address, class:"sr-only" %>
<div class="input-group">
<span class="input-group-addon">
<span class="fa fa-home"></span>
Endereço
</span>
<%= f.text_field :address, class:"form-control", placeholder:"Ex.: Rua do limoeiro, casa 53" %>
</div>
</div>
<div class="form-group">
<%= f.label :phone, class:"sr-only" %>
<div class="input-group">
<span class="input-group-addon">
<span class="fa fa-phone"></span>
Telefone
</span>
<%= f.text_field :phone, class:"form-control", placeholder:'Somente números com DDD.' %>
</div>
</div>
<div class="form-group">
<%= f.label :birth_date, class:"sr-only" %>
<div class="input-group">
<span class="input-group-addon">
<span class="fa fa-gift"></span>
Data de nascimento
</span>
<%= f.date_field :birth_date, class:"form-control", placeholder:"Ex.: dd/mm/aaaa" %>
</div>
</div>
<div class="form-group">
<%= f.label :admission_date, class:"sr-only" %>
<div class="input-group">
<span class="input-group-addon">
<span class="fa fa-gift"></span>
Data de admissão
</span>
<%= f.date_field :admission_date, class:"form-control", placeholder:"Ex.: dd/mm/aaaa" %>
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon">
<span class="fa fa-venus-mars"></span>
Sexo
</span>
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-radio" name="btn1">
<%= f.radio_button(:gender,"Feminino") %> Feminino
</label>
<label class="btn btn-radio" name="btn2">
<%= f.radio_button(:gender,"Masculino") %> Masculino
</label>
</div>
</div>
</div>
<%= f.button '<span class="fa fa-check"></span> Salvar'.html_safe, type:"submit", class:'btn btn-lg btn-success' %>
<% end %>