Skip to content

Commit

Permalink
Make sure approved users have an admin checkbox when they are approved
Browse files Browse the repository at this point in the history
  • Loading branch information
gabceb committed Feb 22, 2013
1 parent e0ed0fb commit 4c15ac8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/assets/javascripts/admin/admin.js.coffee
Expand Up @@ -50,6 +50,9 @@ act_on_user = (obj)->
toggleTableIfNeeded $(".waiting-for-approval-users")
toggleTableIfNeeded $(".approved-users")

# Show the admin row that is hidden on the waiting for approval users table
$row.find("td.admin").show()

return

request.error (data, textStatus, jqXHR) ->
Expand All @@ -71,6 +74,7 @@ toggelAdminOnUser = ()->
message = if checked then "make #{full_name} an administrator?" else "remove #{full_name} from the administrators?"
message = "Are you sure " + message

# If the user didnt confirm then put the check back and return
if(confirm(message) != true)
$el.prop("checked", !checked);
return
Expand Down

0 comments on commit 4c15ac8

Please sign in to comment.