blob: 276cc6125c13bdde155868b28918ec2bebee379b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
<div class="box w40em">
<h2>New user</h2>
<%= form_for([:admin, @user]) do |f| %>
<% if @user.errors.any? %>
<div id="errorExplanation" class="errorExplanation">
<h2><%= pluralize(@user.errors.count, "error") %> prohibited this record from being saved:</h2>
<ul>
<% @user.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<table>
<tr>
<th>Login</th>
<td><%= f.text_field :login %></td>
</tr>
<tr>
<th>Name</th>
<td><%= f.text_field :name %></td>
</tr>
<tr>
<th>Email</th>
<td><%= f.text_field :email %></td>
</tr>
<tr>
<th>Access Level</th>
<td><%= select('user', 'access', access_list) %></td>
</tr>
<tr>
<th>Disabled flag</th>
<td><%= f.check_box :disabled %></td>
</tr>
<tr>
<th>Admin flag</th>
<td><%= f.check_box :jefe %></td>
</tr>
</table>
<p>
<%= f.submit 'Update' %>
</p>
</div>
<% end %>
<%= link_to 'Back', admin_users_path %>
|