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 def update
if (mod? && current_user.role >= @user.role ) || (@user.is?(current_user) && confirmed?) if (mod? && current_user.role >= @user.role ) || (@user.is?(current_user) && confirmed?)
if mod? 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 else
userdata = user_params([:name, :skype, :skype_public, :youtube, :twitter, :about]) userdata = user_params([:name, :skype, :skype_public, :youtube, :twitter, :about])
end end

View File

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