30 lines
682 B
Plaintext
30 lines
682 B
Plaintext
<% if flash[:error].present? %>
|
|
<div class="error">
|
|
<%= flash[:error] %>
|
|
<p>
|
|
<% user.errors.messages.each do |k,v| %>
|
|
<%= "#{k.to_s} #{v.join(' and ')}" %><br />
|
|
<% end %>
|
|
</p>
|
|
</div>
|
|
<% end %>
|
|
|
|
<%= form_for user, url: action do |form| %>
|
|
<div class="form-group">
|
|
<%= form.label :name, "Full Name" %>
|
|
<%= form.text_field :name %>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<%= form.label :email, "eMail" %>
|
|
<%= form.email_field :email %>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<%= form.label :role, "Role" %>
|
|
<%= form.select :role, admin_role_options(user.role), include_blank: false %>
|
|
</div>
|
|
|
|
<%= form.submit %>
|
|
<% end %>
|