root/app/views/account/_form.rhtml

Revision 1, 1.0 kB (checked in by falcon, 17 years ago)

Version one -> initial work from the laptop.

Line 
1<% form_for :user, :url => {:action => "update", :id => @user } do |f| -%>
2
3        <p><label for="login">Login</label><br/>
4                <%= f.text_field :login %>
5        </p>
6       
7        <p><label for="Role">Role</label><br/>
8        <SELECT name="user[role]" >     
9                                <% if @user.roles.include?("admin") %>
10                                        <option selected value="admin">Admin</option>
11                                <% else %>
12                                        <option value="admin">Admin</option>
13                                <% end %>
14                               
15                                <% if @user.roles.include?("editor") %>
16                                        <option selected value="editor">User - Upload and Download</option>
17                                <% else %>
18                                        <option value="editor">User - Upload and Download</option>
19                                <% end %>
20                               
21                                <% if @user.roles.include?("viewer") %>
22                                        <option selected  value="viewer">User - Download</option>
23                                <% else %>
24                                        <option value="viewer">User - Download</option>
25                                <% end %>               
26                        </SELECT>
27        </p>
28       
29        <p><label for="email">Email</label><br/>
30                <%= f.text_field :email %>
31        </p>
32       
33        <p><%= submit_tag 'Modify' %></p>
34<% end -%>
Note: See TracBrowser for help on using the browser.