add donor to edit profile page

This commit is contained in:
jomo
2014-06-30 23:59:25 +02:00
parent ab953f9c2c
commit fded24aea7
2 changed files with 7 additions and 1 deletions

View File

@@ -135,7 +135,7 @@ class UsersController < ApplicationController
def update
if (mod? && current_user.role >= @user.role ) || (@user.is?(current_user) && confirmed?)
if mod?
userdata = user_params([:name, :skype, :skype_public, :youtube, :twitter, :about, :role, :confirmed])
userdata = user_params([:name, :skype, :skype_public, :youtube, :twitter, :about, :role, :confirmed, :donor])
else
userdata = user_params([:name, :skype, :skype_public, :youtube, :twitter, :about])
end

View File

@@ -33,6 +33,12 @@
<%= f.select :confirmed, [["No", false], ["Yes", true]], {}, { disabled: !can_edit? } %>
</td>
</tr>
<tr>
<td>Donator</td>
<td>
<%= f.select :donor, [["No", false], ["Yes", true]], {}, { disabled: !can_edit? } %>
</td>
</tr>
<% end %>
<tr>
<td>Skype username</td>