Skip to content

Commit

Permalink
Changed up user form a bit - will need a UI cleanup later
Browse files Browse the repository at this point in the history
  • Loading branch information
augustf committed May 6, 2012
1 parent cfd6415 commit 57b8f7b
Showing 1 changed file with 30 additions and 7 deletions.
37 changes: 30 additions & 7 deletions app/views/users/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,26 @@
<%= f.text_field :email, :class => "span4" %>
</div>
</div>

<div class="clearfix">
<label>Admin Status</label>
<%= f.label :locale %>
<div class="input">
<ul class="inputs-list">
<li>
<%= f.check_box :is_admin %> <%= f.label :is_admin %>
</li>
</ul>
<%= select_tag 'locale', options_for_select(I18n.available_locales, I18n.locale.to_sym) %>
</div>
</div>

<% if can? :manage, @user %>
<div class="clearfix">
<label>Admin Status</label>
<div class="input">
<ul class="inputs-list">
<li>
<%= f.check_box :is_admin %> <%= f.label :is_admin %>
</li>
</ul>
</div>
</div>
<% end %>
</fieldset>

<div class="submit_bar actions">
Expand All @@ -46,3 +55,17 @@
<% end %>


<h2>Change your password</h2>

<%= form_for(@user) do |f| %>
<%= f.hidden_field :reset_password_token %>

<p><%= f.label :password, "New password" %><br />
<%= f.password_field :password %></p>

<p><%= f.label :password_confirmation, "Confirm new password" %><br />
<%= f.password_field :password_confirmation %></p>

<p><%= f.submit "Change my password" %></p>
<% end %>

0 comments on commit 57b8f7b

Please sign in to comment.